]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/progdlgg.cpp
in-place editing code from Michael Bedward integrated (with my docs)
[wxWidgets.git] / src / generic / progdlgg.cpp
index 137a4be73c3f39b4a850ca5a0642d929a97e09c1..b4bd92686f52c71a58a7127e8428cbf372dbcb41 100644 (file)
@@ -31,6 +31,8 @@
 #include "wx/intl.h"
 #endif
 
+#if wxUSE_PROGRESSDLG
+
 #include "wx/generic/progdlgg.h"
 
 #define LAYOUT_X_MARGIN 8
@@ -129,7 +131,6 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
       m_gauge->SetValue(value + 1);
    if( !newmsg.IsEmpty() )
       m_msg->SetLabel(newmsg);
-   wxYield();
 
    if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) )
    {
@@ -146,9 +147,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
        }
 
        m_state = Finished;
-       while ( m_state != Canceled ) // set from OnClose()
-           wxYield();
-
+       
        // so that we return TRUE below
        m_state = Finished;
    }
@@ -172,3 +171,5 @@ wxProgressDialog::~wxProgressDialog()
    else
       wxEnableTopLevelWindows(TRUE);
 }
+
+#endif