X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/96be256b3e1802de10f45953c41ed33bce399b54..48f625bc2ce81132a2a8c2d7c524a03f1b7196e5:/src/motif/dialog.cpp diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index 84ca36e6db..8f234a2f20 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "dialog.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -151,12 +147,13 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, return true; } -bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id, - const wxString& title, - const wxPoint& pos, - const wxSize& size, - long style, - const wxString& name ) +bool wxDialog::DoCreate(wxWindow* parent, + wxWindowID id, + const wxString& title, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) { Widget parentWidget = (Widget) 0; if( parent ) @@ -195,6 +192,10 @@ bool wxDialog::DoCreate( wxWindow* parent, wxWindowID id, return true; } +void wxDialog::DoDestroy() +{ +} + void wxDialog::SetModal(bool flag) { #ifdef __VMS @@ -233,12 +234,8 @@ wxDialog::~wxDialog() } PreDestroy(); - DoDestroy(); -} -void wxDialog::DoDestroy() -{ - if( m_mainWidget ) + if ( m_mainWidget ) { wxDeleteWindowFromTable( (Widget)m_mainWidget ); XtDestroyWidget( (Widget)m_mainWidget ); @@ -296,6 +293,14 @@ bool wxDialog::Show( bool show ) m_isShown = show; + if (show) + { + // this usually will result in TransferDataToWindow() being called + // which will change the controls values so do it before showing as + // otherwise we could have some flicker + InitDialog(); + } + if (show) { if (!wxUSE_INVISIBLE_RESIZE) @@ -365,6 +370,8 @@ void wxDialog::EndModal(int retCode) m_modalShowing = false; m_eventLoop->Exit(); + + SetModal(false); } // Standard buttons