X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ce4169a4d129fc6cd165b2e9ccc5cf5d48356020..7b280524bb94f3e1ceca283b23b0f374e4182762:/src/generic/progdlgg.cpp diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index b3b74cc634..949ef76a25 100644 --- a/src/generic/progdlgg.cpp +++ b/src/generic/progdlgg.cpp @@ -66,7 +66,7 @@ wxProgressDialog::wxProgressDialog(wxString const &title, height += 35; wxFrame::Create(m_parent, -1, title, wxPoint(0, 0), wxSize(220, height), - wxDEFAULT_DIALOG_STYLE); + wxDEFAULT_DIALOG_STYLE | style ); wxLayoutConstraints *c; @@ -127,11 +127,12 @@ wxProgressDialog::Update(int value, const wxString& newmsg) wxASSERT_MSG( value == -1 || m_gauge, _T("can't update non existent dialog") ); wxASSERT_MSG( value < m_maximum, _T("invalid progress value") ); + if( m_gauge ) m_gauge->SetValue(value + 1); + if( !newmsg.IsEmpty() ) m_msg->SetLabel(newmsg); - wxYield(); if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) ) { @@ -148,9 +149,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; }