From 4080c40a71a40c54798f2681e22c7cc4701ace07 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Wed, 23 Jun 1999 16:17:16 +0000 Subject: [PATCH] wxProgressDialg works again. Did I do "update" in testconf? git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2880 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- samples/controls/controls.cpp | 1 + src/generic/printps.cpp | 1 + src/generic/progdlgg.cpp | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/samples/controls/controls.cpp b/samples/controls/controls.cpp index fb6ff1c2ad..4df2c078f7 100644 --- a/samples/controls/controls.cpp +++ b/samples/controls/controls.cpp @@ -776,6 +776,7 @@ void MyPanel::OnShowProgress( wxCommandEvent& WXUNUSED(event) ) { cont = dialog.Update(i); } + wxYield(); } if ( !cont ) diff --git a/src/generic/printps.cpp b/src/generic/printps.cpp index be4cbae7b6..dcaf5394c5 100644 --- a/src/generic/printps.cpp +++ b/src/generic/printps.cpp @@ -222,6 +222,7 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro keepGoing = false; } } + wxYield(); } printout->OnEndDocument(); } diff --git a/src/generic/progdlgg.cpp b/src/generic/progdlgg.cpp index b4bd92686f..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,8 +127,10 @@ 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); -- 2.45.2