]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/toplvcmn.cpp
_really_ fixed translation messages
[wxWidgets.git] / src / common / toplvcmn.cpp
index 1f13c2535a89798f99dcaf1cb6380b45cae6f50d..b1af3fdd14ece11311c8a76ec6b20c08d2bf198e 100644 (file)
@@ -28,9 +28,9 @@
 #endif
 
 #ifndef WX_PRECOMP
 #endif
 
 #ifndef WX_PRECOMP
-    #include "wx/app.h"
     #include "wx/toplevel.h"
     #include "wx/dcclient.h"
     #include "wx/toplevel.h"
     #include "wx/dcclient.h"
+    #include "wx/app.h"
 #endif // WX_PRECOMP
 
 // ----------------------------------------------------------------------------
 #endif // WX_PRECOMP
 
 // ----------------------------------------------------------------------------
@@ -86,12 +86,12 @@ bool wxTopLevelWindowBase::Destroy()
     return TRUE;
 }
 
     return TRUE;
 }
 
-/* static */
-bool wxTopLevelWindowBase::IsLastBeforeExit()
+bool wxTopLevelWindowBase::IsLastBeforeExit() const
 {
     // we exit the application if there are no more top level windows left
     // normally but wxApp can prevent this from happening
 {
     // we exit the application if there are no more top level windows left
     // 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();
 }