]> git.saurik.com Git - wxWidgets.git/commitdiff
remove the unneeded +1 from wxGauge::SetValue() call in Update()
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 6 Jul 2007 12:11:08 +0000 (12:11 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 6 Jul 2007 12:11:08 +0000 (12:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47192 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/progdlgg.cpp

index b6e89e568b1b2bcd23a17383ea2c3408756c90f7..fbb2699e627789b4f6e4de1670e42517f9985872 100644 (file)
@@ -338,12 +338,8 @@ wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip)
 
     wxASSERT_MSG( value <= m_maximum, wxT("invalid progress value") );
 
 
     wxASSERT_MSG( value <= m_maximum, wxT("invalid progress value") );
 
-    // fill up the gauge if value == maximum because this means that the dialog
-    // is going to close and the gauge shouldn't be partly empty in this case
-    if ( m_gauge && value <= m_maximum )
-    {
-        m_gauge->SetValue(value == m_maximum ? value : value + 1);
-    }
+    if ( m_gauge )
+        m_gauge->SetValue(value);
 
     UpdateMessage(newmsg);
 
 
     UpdateMessage(newmsg);