From 48160eb23de5a465d4cf614cf123f38d2ffa1fd4 Mon Sep 17 00:00:00 2001 From: tchernobog Date: Sat, 9 Sep 2006 12:34:51 +0000 Subject: [PATCH] - Clamp max percentual in JumpToDialog to avoid a gtk+ warning git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@1077 3ecf2c5c-341e-0410-92b4-d18e462d057c --- src/jump_to_dialog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/jump_to_dialog.cc b/src/jump_to_dialog.cc index d94ca07..a3ceffe 100644 --- a/src/jump_to_dialog.cc +++ b/src/jump_to_dialog.cc @@ -160,7 +160,7 @@ JumpToDialog::update(const Simulation& changed_simulation) { unsigned int front = changed_simulation.get_history().get_front(); - double percent = static_cast(front) / _target_instant; + double percent = std::min(static_cast(front) / _target_instant, 1.0); _progress->set_fraction(percent);