X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a756f210019dd5b51331b7181c816d3882146a30..67d7821742674d740f1a14e300ea5f446310fd17:/src/generic/progdlgg.cpp diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index 0e4c493c43..ee2f457eff 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -221,16 +221,17 @@ wxProgressDialog::wxProgressDialog(wxString const &title, #endif // MSW/!MSW c->bottom.SameAs(this, wxBottom, 2*LAYOUT_Y_MARGIN); - wxSize sizeBtn = wxButton::GetDefaultSize(); - c->width.Absolute(sizeBtn.x); - c->height.Absolute(sizeBtn.y); + c->width.AsIs(); + c->height.AsIs(); m_btnAbort->SetConstraints(c); - sizeDlg.y += 2*LAYOUT_Y_MARGIN + sizeBtn.y; + sizeDlg.y += 2*LAYOUT_Y_MARGIN + wxButton::GetDefaultSize().y; } - else + else // no "Cancel" button + { m_btnAbort = (wxButton *)NULL; + } SetAutoLayout(TRUE); Layout(); @@ -269,6 +270,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, // Update the display (especially on X, GTK) wxYield(); + wxYield(); #ifdef __WXMAC__ MacUpdateImmediately(); @@ -329,6 +331,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg) m_msg->SetLabel(newmsg); wxYield(); + wxYield(); } if ( (m_elapsed || m_remaining || m_estimated) && (value != 0) ) @@ -367,6 +370,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg) m_msg->SetLabel(_("Done.")); } + wxYield(); wxYield(); (void)ShowModal(); @@ -381,6 +385,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg) { // update the display wxYield(); + wxYield(); } #ifdef __WXMAC__