]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectlg.cpp
Changed wxYield to wxYieldIfNeeded in PopupMenu, to avoid recursive wxYield assertions
[wxWidgets.git] / src / generic / treectlg.cpp
index 0984a23ed2639e827f273cc2b250b84fc3ae40cc..c7155ed9a212ddbe1b273eaf2313b4c9e9609424 100644 (file)
@@ -2282,34 +2282,26 @@ void wxGenericTreeCtrl::Edit( const wxTreeItemId& item )
             m_imageListNormal->GetSize( image, image_w, image_h );
             image_w += 4;
         }
-        else // !RightDown() && !LeftUp() ==> LeftDown() || LeftDClick()
+        else
         {
             wxFAIL_MSG(_T("you must create an image list to use images!"));
         }
     }
     x += image_w;
     w -= image_w + 4; // I don't know why +4 is needed
-            if ( flags & wxTREE_HITTEST_ONITEMBUTTON )
-            {
-                // only toggle the item for a single click, double click on
-                // the button doesn't do anything (it toggles the item twice)
-                if ( event.LeftDown() )
-                {
-                    Toggle( item );
-                }
-
-                // don't select the item if the button was clicked
-                return;
-            }
-
 
     wxClientDC dc(this);
     PrepareDC( dc );
     x = dc.LogicalToDeviceX( x );
     y = dc.LogicalToDeviceY( y );
 
-    wxTreeTextCtrl *text = new wxTreeTextCtrl(
-      this, -1, &m_renameAccept, &m_renameRes, this, s, wxPoint(x-4,y-4), wxSize(w+11,h+8) );
+    wxTreeTextCtrl *text = new wxTreeTextCtrl(this, -1,
+                                              &m_renameAccept,
+                                              &m_renameRes,
+                                              this,
+                                              s,
+                                              wxPoint(x-4,y-4),
+                                              wxSize(w+11,h+8));
     text->SetFocus();
 }