]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes to progressdialog and its use in printing framework
authorKarsten Ballüder <ballueder@usa.net>
Mon, 21 Jun 1999 14:11:45 +0000 (14:11 +0000)
committerKarsten Ballüder <ballueder@usa.net>
Mon, 21 Jun 1999 14:11:45 +0000 (14:11 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/printps.cpp
src/generic/progdlgg.cpp

index 5cb8272a26cdaf93ecb255ae51abb6a2e08d5391..be4cbae7b6e81370c0a5e96f537e1183fb810942 100644 (file)
@@ -178,7 +178,8 @@ bool wxPostScriptPrinter::Print(wxWindow *parent, wxPrintout *printout, bool pro
        printout->GetTitle(),
        _("Printing..."),
        totalPages,
        printout->GetTitle(),
        _("Printing..."),
        totalPages,
-       parent );
+       parent,
+       wxPD_CAN_ABORT|wxPD_AUTO_HIDE|wxPD_APP_MODAL);
     
     printout->OnBeginPrinting();
 
     
     printout->OnBeginPrinting();
 
index b3b74cc634189693e12e2d304d68da7c02492bf0..b4bd92686f52c71a58a7127e8428cbf372dbcb41 100644 (file)
@@ -131,7 +131,6 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
       m_gauge->SetValue(value + 1);
    if( !newmsg.IsEmpty() )
       m_msg->SetLabel(newmsg);
       m_gauge->SetValue(value + 1);
    if( !newmsg.IsEmpty() )
       m_msg->SetLabel(newmsg);
-   wxYield();
 
    if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) )
    {
 
    if ( (value == m_maximum - 1) && !(GetWindowStyleFlag() & wxPD_AUTO_HIDE) )
    {
@@ -148,9 +147,7 @@ wxProgressDialog::Update(int value, const wxString& newmsg)
        }
 
        m_state = Finished;
        }
 
        m_state = Finished;
-       while ( m_state != Canceled ) // set from OnClose()
-           wxYield();
-
+       
        // so that we return TRUE below
        m_state = Finished;
    }
        // so that we return TRUE below
        m_state = Finished;
    }