]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/configitem.cpp
Resize all top level windows when SIP changes visibility.
[wxWidgets.git] / utils / configtool / src / configitem.cpp
index c19655aeb7bba5b4edc2360a7e96ed6d196ea5a8..a0734645d75eeadbee1aa145a701964a1645b634 100644 (file)
@@ -9,19 +9,14 @@
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "configitem.h"
-#endif
-
-// Includes other headers for precompiled compilation
-#include "wx/wx.h"
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 #pragma hdrstop
 #endif
 
 #include "wx/tokenzr.h"
-
 #include "configitem.h"
 #include "configtree.h"
 #include "configtooldoc.h"
@@ -439,12 +434,14 @@ void ctConfigItem::Attach(ctConfigItem* parent, ctConfigItem* insertBefore)
     if (parent)
     {
         SetParent(parent);
-        wxObjectList::compatibility_iterator node = (wxObjectList::compatibility_iterator)NULL;
         if (insertBefore)
-            node = parent->GetChildren().Member(insertBefore);
-
-        if (node)
-            parent->GetChildren().Insert(node, this);
+        {
+            wxObjectList::compatibility_iterator node = parent->GetChildren().Member(insertBefore);
+            if (node)
+                parent->GetChildren().Insert(node, this);
+            else
+                parent->GetChildren().Append(this);
+        }
         else
             parent->GetChildren().Append(this);
     }