]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/gizmos/wxCode/src/treelistctrl.cpp
Fix to FIXME: better nothing than broken comparison.
[wxWidgets.git] / wxPython / contrib / gizmos / wxCode / src / treelistctrl.cpp
index 260d264ff70d3dc5a56440408020d1c3d4c9c6b9..c147e7577166996f235bfd5b56890ae2a74a4a05 100644 (file)
@@ -1676,8 +1676,10 @@ wxTreeListItem *wxTreeListItem::HitTest(const wxPoint& point,
             }
 
             // check for image hit
-            if (theCtrl->m_imgWidth > 0) {
+            if (theCtrl->m_imgWidth > 0 && GetImage() != NO_IMAGE) {
                 int imgX = m_x - theCtrl->m_imgWidth2;
+                if (HasPlus() && theCtrl->HasButtons())
+                    imgX += theCtrl->m_btnWidth + LINEATROOT;
                 int imgY = y_mid - theCtrl->m_imgHeight2;
                 if ((point.x >= imgX) && (point.x <= (imgX + theCtrl->m_imgWidth)) &&
                     (point.y >= imgY) && (point.y <= (imgY + theCtrl->m_imgHeight))) {
@@ -1875,7 +1877,7 @@ void wxTreeListMainWindow::Init()
 
     m_underMouse = NULL;
 
-#if defined( __WXMAC__ ) && __WXMAC_CARBON__
+#if defined( __WXMAC__ ) && defined(__WXMAC_CARBON__)
     m_normalFont.MacCreateThemeFont( kThemeViewsFont ) ;
 #else
     m_normalFont = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT );