added wxWindowDisabler ctor for conditionally disabling all windows and use it in WaitForChild()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52671 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1447,8 +1447,7 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData)
|
||||
// prepare to wait for the child termination: show to the user that we're
|
||||
// busy and refuse all input unless explicitly told otherwise
|
||||
wxBusyCursor bc;
|
||||
wxWindowDisabler *wd = flags & wxEXEC_NODISABLE ? NULL
|
||||
: new wxWindowDisabler;
|
||||
wxWindowDisabler wd(!(flags & wxEXEC_NODISABLE));
|
||||
|
||||
// endProcData.pid will be set to 0 from wxHandleProcessTermination() when
|
||||
// the process terminates
|
||||
@@ -1480,8 +1479,6 @@ int wxGUIAppTraits::WaitForChild(wxExecuteData& execData)
|
||||
wxYield();
|
||||
}
|
||||
|
||||
delete wd;
|
||||
|
||||
return endProcData.exitcode;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user