]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
Font work.
[wxWidgets.git] / src / generic / progdlgg.cpp
index 169a7ea949460c18a6ecbecbb884f428ba6bfebe..c99c98dac7673c49c586784b0f6d7d44ed940218 100644 (file)
@@ -322,7 +322,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
 
     wxASSERT_MSG( value <= m_maximum, wxT("invalid progress value") );
 
-    if ( m_gauge )
+    if ( m_gauge && value < m_maximum )
     {
         m_gauge->SetValue(value + 1);
     }
@@ -406,6 +406,17 @@ void wxProgressDialog::Resume()
     m_btnAbort->Enable();
 }
 
+bool wxProgressDialog::Show( bool show )
+{
+    // reenable other windows before hiding this one because otherwise
+    // Windows wouldn't give the focus back to the window which had
+    // been previously focused because it would still be disabled
+    if(!show)
+        ReenableOtherWindows();
+
+    return wxDialog::Show(show);
+}
+
 // ----------------------------------------------------------------------------
 // event handlers
 // ----------------------------------------------------------------------------