]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/dialog.cpp
moving libiconv and libz into linker flags, as Xcode resolves the links otherwise...
[wxWidgets.git] / src / motif / dialog.cpp
index 84ca36e6db39082941c35c982da5a26393918e9b..cf91fefe54fc4414d70147a72c5f80358c9893b1 100644 (file)
@@ -151,12 +151,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 )
@@ -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