]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/configtree.cpp
Regenerate Makefile.in, configure and the VC++ project files after adding rcdefs.h
[wxWidgets.git] / utils / configtool / src / configtree.cpp
index 28e32bddb45af5a79eabcde46a0cac3fdd171d96..10769df40ef150d103031d6c74c279a12648dda7 100644 (file)
@@ -9,19 +9,15 @@
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "configtree.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
 
 
 #ifdef __BORLANDC__
 #pragma hdrstop
 #endif
 
-#include "wx/imaglist.h"
 #include "wx/cshelp.h"
 #include "wx/cshelp.h"
+#include "wx/imaglist.h"
 
 // Include XPM icons
 #include "bitmaps/closedfolder.xpm"
 
 // Include XPM icons
 #include "bitmaps/closedfolder.xpm"
@@ -202,10 +198,11 @@ void ctConfigTreeCtrl::OnHelp(wxHelpEvent& event)
     wxPoint pt = ScreenToClient(event.GetPosition());
     int flags = 0;
     wxTreeItemId id = HitTest(pt, flags);
     wxPoint pt = ScreenToClient(event.GetPosition());
     int flags = 0;
     wxTreeItemId id = HitTest(pt, flags);
+    ctTreeItemData *itemData = (ctTreeItemData*) GetItemData(id);
     wxHelpProvider *helpProvider = wxHelpProvider::Get();
     wxHelpProvider *helpProvider = wxHelpProvider::Get();
-    if ( helpProvider && id > 0)
+    if ( helpProvider && itemData)
     {
     {
-        ctConfigItem* item = ((ctTreeItemData*) GetItemData(id))->GetConfigItem();
+        ctConfigItem* item = itemData->GetConfigItem();
         if (item)
         {
             wxString helpTopic = item->GetPropertyString(wxT("help-topic"));
         if (item)
         {
             wxString helpTopic = item->GetPropertyString(wxT("help-topic"));