]> git.saurik.com Git - wxWidgets.git/commitdiff
don't change the dialog size when updating the message; document that this is intenti...
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Mar 2009 12:31:26 +0000 (12:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 23 Mar 2009 12:31:26 +0000 (12:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

interface/wx/progdlg.h
src/generic/progdlgg.cpp

index cbd51b5e4f35cbef605ab334016015b14854d422..9933e795a1896103af80f8891f9436534812e411 100644 (file)
@@ -112,10 +112,14 @@ public:
     wxString GetMessage() const;
 
     /**
-        Works like Update() but makes the gauge control run in indeterminate mode
-        (see wxGauge documentation); sets the remaining and the estimated time labels
-        (if present) to "Unknown" or to @a newmsg (if it's non-empty); moves the progress
-        bar a bit to indicate that some progress was done.
+        Like Update() but makes the gauge control run in indeterminate mode.
+
+        In indeterminate mode the remaining and the estimated time labels (if
+        present) are set to to "Unknown" or to @a newmsg (if it's non-empty).
+        Each call to this function moves the progress bar a bit to indicate
+        that some progress was done.
+
+        @see wxGauge::Pulse(), Update()
     */
     virtual bool Pulse(const wxString& newmsg = wxEmptyString, bool* skip = NULL);
 
@@ -125,14 +129,19 @@ public:
     void Resume();
 
     /**
-        Updates the dialog, setting the progress bar to the new value and, if
-        given changes the message above it. Returns @true unless the "Cancel" button
-        has been pressed.
+        Updates the dialog, setting the progress bar to the new value and
+        updating the message if new one is specified.
+
+        Returns @true unless the "Cancel" button has been pressed.
 
         If @false is returned, the application can either immediately destroy the
         dialog or ask the user for the confirmation and if the abort is not confirmed
         the dialog may be resumed with Resume() function.
 
+        Notice that you may want to call Fit() to change the dialog size to
+        conform to the length of the new message if desired. The dialog does
+        not do this automatically.
+
         @param value
             The new value of the progress meter. It should be less than or equal to
             the maximum value given to the constructor.
index ca8f0d5d617ed41d3ee741c461edc5854fd064d5..68b58cada4bddb235fd4ca662c0112834d681b98 100644 (file)
@@ -687,8 +687,6 @@ void wxProgressDialog::UpdateMessage(const wxString &newmsg)
     {
         m_msg->SetLabel(newmsg);
 
-        Fit();   // adapt to the new label size
-
         // allow the window to repaint:
         // NOTE: since we yield only for UI events with this call, there
         //       should be no side-effects