]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/configitem.cpp
fixed previous revision: call wxControl's, not wxButton's DoGetBestSize
[wxWidgets.git] / utils / configtool / src / configitem.cpp
index c19655aeb7bba5b4edc2360a7e96ed6d196ea5a8..fdf4ceac4f2841e661d45f0f33c018acf813c35d 100644 (file)
 #pragma implementation "configitem.h"
 #endif
 
 #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"
 
 #ifdef __BORLANDC__
 #pragma hdrstop
 #endif
 
 #include "wx/tokenzr.h"
-
 #include "configitem.h"
 #include "configtree.h"
 #include "configtooldoc.h"
 #include "configitem.h"
 #include "configtree.h"
 #include "configtooldoc.h"
@@ -439,12 +438,14 @@ void ctConfigItem::Attach(ctConfigItem* parent, ctConfigItem* insertBefore)
     if (parent)
     {
         SetParent(parent);
     if (parent)
     {
         SetParent(parent);
-        wxObjectList::compatibility_iterator node = (wxObjectList::compatibility_iterator)NULL;
         if (insertBefore)
         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);
     }
         else
             parent->GetChildren().Append(this);
     }