]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
fixes to the sizers behaviour necessary to make the log dialog work again
[wxWidgets.git] / src / common / wincmn.cpp
index faa3837b1c3d033ca61507ccf74fd9ab9264648c..1d70eebd623700259a1b7957126e362d4f45072b 100644 (file)
@@ -364,6 +364,17 @@ void wxWindowBase::Centre(int direction)
             }
         }
 
+        // we shouldn't center the dialog on the iconized window: under
+        // Windows, for example, this places it completely off the screen
+        if ( parent )
+        {
+            wxTopLevelWindow *winTop = wxDynamicCast(parent, wxTopLevelWindow);
+            if ( winTop && winTop->IsIconized() )
+            {
+                parent = NULL;
+            }
+        }
+
         // did we find the parent?
         if ( !parent )
         {