X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f73f25cc81a95cbfff4f1afa850aae5976a423c..4e15d1caa03346c126015019c1fdf093033ef40b:/src/gtk/dialog.cpp diff --git a/src/gtk/dialog.cpp b/src/gtk/dialog.cpp index bb3fbd1586..4cf2730f9c 100644 --- a/src/gtk/dialog.cpp +++ b/src/gtk/dialog.cpp @@ -19,6 +19,7 @@ #include "wx/evtloop.h" #include "wx/scopedptr.h" +#include "wx/testing.h" #include @@ -32,8 +33,6 @@ wxDEFINE_TIED_SCOPED_PTR_TYPE(wxGUIEventLoop) // wxDialog //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxDialog,wxTopLevelWindow) - void wxDialog::Init() { m_modalLoop = NULL; @@ -102,6 +101,8 @@ void wxDialog::SetModal( bool WXUNUSED(flag) ) int wxDialog::ShowModal() { + WX_TESTING_SHOW_MODAL_HOOK(); + wxASSERT_MSG( !IsModal(), "ShowModal() can't be called twice" ); // release the mouse if it's currently captured as the window having it @@ -111,7 +112,7 @@ int wxDialog::ShowModal() if ( win ) win->GTKReleaseMouseAndNotify(); - wxWindow * const parent = GetParentForModalDialog(GetParent()); + wxWindow * const parent = GetParentForModalDialog(); if ( parent ) { gtk_window_set_transient_for( GTK_WINDOW(m_widget),