fix for the bug introduced by the last commit: don't quit the program when a standard msg box is closed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-08-16 00:44:03 +00:00
parent 3957448a34
commit 5c36387841
2 changed files with 5 additions and 5 deletions

View File

@@ -140,9 +140,9 @@ protected:
virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const
{ return FALSE; } { return FALSE; }
// check if we should exit the program after deleting another top level // check if we should exit the program after deleting this top level
// window (this is used in common dtor and wxMSW code) // window (this is used in common dtor and wxMSW code)
static bool IsLastBeforeExit(); bool IsLastBeforeExit() const;
// send the iconize event, return TRUE if processed // send the iconize event, return TRUE if processed
bool SendIconizeEvent(bool iconized = TRUE); bool SendIconizeEvent(bool iconized = TRUE);

View File

@@ -86,12 +86,12 @@ bool wxTopLevelWindowBase::Destroy()
return TRUE; return TRUE;
} }
/* static */ bool wxTopLevelWindowBase::IsLastBeforeExit() const
bool wxTopLevelWindowBase::IsLastBeforeExit()
{ {
// we exit the application if there are no more top level windows left // we exit the application if there are no more top level windows left
// normally but wxApp can prevent this from happening // normally but wxApp can prevent this from happening
return (wxTopLevelWindows.GetCount() == 1) && return wxTopLevelWindows.GetCount() == 1 &&
wxTopLevelWindows.GetFirst()->GetData() == (wxWindow *)this &&
wxTheApp && wxTheApp->GetExitOnFrameDelete(); wxTheApp && wxTheApp->GetExitOnFrameDelete();
} }