Applied [ 652962 ] wxProgressDialog::Show(FALSE) bug
This fixes the problem where the application windows were not being enabled prior to the progress dialog being hidden in the situation where wxPD_AUTO_HIDE was not used or was used but the end count was never reached. This causes random applications to be activated and brought to the front on Windows. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18259 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -63,6 +63,8 @@ public:
 | 
			
		||||
   */
 | 
			
		||||
   void Resume();
 | 
			
		||||
 | 
			
		||||
   bool Show( bool show = TRUE );
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
   // callback for optional abort button
 | 
			
		||||
   void OnCancel(wxCommandEvent& event);
 | 
			
		||||
 
 | 
			
		||||
@@ -406,6 +406,17 @@ void wxProgressDialog::Resume()
 | 
			
		||||
    m_btnAbort->Enable();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool wxProgressDialog::Show( bool show )
 | 
			
		||||
{
 | 
			
		||||
    // reenable other windows before hiding this one because otherwise
 | 
			
		||||
    // Windows wouldn't give the focus back to the window which had
 | 
			
		||||
    // been previously focused because it would still be disabled
 | 
			
		||||
    if(!show)
 | 
			
		||||
        ReenableOtherWindows();
 | 
			
		||||
 | 
			
		||||
    return wxDialog::Show(show);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ----------------------------------------------------------------------------
 | 
			
		||||
// event handlers
 | 
			
		||||
// ----------------------------------------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user