Ensure that the progress dialog parent is activated at the end under MSW.
The progress dialog parent was supposed to become the new foreground window when the progress dialog was closed, but this didn't happen because m_parentTop was never set when the native progress dialog implementation was used under MSW. Fix this by explicitly calling the new SetTopParent() from its ctor. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
7cee4f7621
commit
7e08367534
@ -121,6 +121,10 @@ protected:
|
||||
// the dialog was shown
|
||||
void ReenableOtherWindows();
|
||||
|
||||
// Set the top level parent we store from the parent window provided when
|
||||
// creating the dialog.
|
||||
void SetTopParent(wxWindow* parent);
|
||||
|
||||
// return the top level parent window of this dialog (may be NULL)
|
||||
wxWindow *GetTopParent() const { return m_parentTop; }
|
||||
|
||||
|
@ -146,12 +146,19 @@ wxGenericProgressDialog::wxGenericProgressDialog(const wxString& title,
|
||||
Create( title, message, maximum, parent, style );
|
||||
}
|
||||
|
||||
void wxGenericProgressDialog::SetTopParent(wxWindow* parent)
|
||||
{
|
||||
m_parentTop = GetParentForModalDialog(parent, GetWindowStyle());
|
||||
}
|
||||
|
||||
bool wxGenericProgressDialog::Create( const wxString& title,
|
||||
const wxString& message,
|
||||
int maximum,
|
||||
wxWindow *parent,
|
||||
int style )
|
||||
{
|
||||
SetTopParent(parent);
|
||||
|
||||
m_parentTop = wxGetTopLevelParent(parent);
|
||||
m_pdStyle = style;
|
||||
|
||||
|
@ -316,7 +316,7 @@ wxProgressDialog::wxProgressDialog( const wxString& title,
|
||||
#ifdef wxHAS_MSW_TASKDIALOG
|
||||
if ( HasNativeTaskDialog() )
|
||||
{
|
||||
SetParent(GetParentForModalDialog(parent, GetWindowStyle()));
|
||||
SetTopParent(parent);
|
||||
SetPDStyle(style);
|
||||
SetMaximum(maximum);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user