]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
move frame decorations drawing to the base class
[wxWidgets.git] / src / generic / treectlg.cpp
index b36a9c38e13b7bd44d6ac750c389f7e090929e0c..0886002dc24d69fd49e32e5521abc2280288663e 100644 (file)
@@ -1891,8 +1891,15 @@ void wxGenericTreeCtrl::SelectItem(const wxTreeItemId& itemId, bool select)
         wxGenericTreeItem *item = (wxGenericTreeItem*) itemId.m_pItem;
         wxCHECK_RET( item, wxT("SelectItem(): invalid tree item") );
 
+        wxTreeEvent event(wxEVT_COMMAND_TREE_SEL_CHANGING, this, item);
+        if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() )
+            return;
+
         item->SetHilight(false);
         RefreshLine(item);
+        
+        event.SetEventType(wxEVT_COMMAND_TREE_SEL_CHANGED);
+        GetEventHandler()->ProcessEvent( event );
     }
 }
 
@@ -2387,7 +2394,6 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
                 int yy = y_mid - image_h/2;
 
                 wxDCClipper clip(dc, xx, yy, image_w, image_h);
-                wxPrintf( wxT("hi\n") );
                 m_imageListButtons->Draw(image, dc, xx, yy,
                                          wxIMAGELIST_DRAW_TRANSPARENT);
             }