]> git.saurik.com Git - wxWidgets.git/commitdiff
Left Double clicking a widget (not a dialog) in the left hand TREE pane will now...
authorGeorge Tasker <gtasker@allenbrook.com>
Tue, 19 Dec 2000 17:22:46 +0000 (17:22 +0000)
committerGeorge Tasker <gtasker@allenbrook.com>
Tue, 19 Dec 2000 17:22:46 +0000 (17:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

utils/dialoged/src/edtree.cpp

index 168fa100cde10e9800e1c76d5d5e3ae447bea3bc..2e9d0e5df0033356b393ff71998d1011ea7f03f6 100644 (file)
@@ -50,7 +50,6 @@ wxTreeCtrl(parent, id, pos, size, style)
 
 void wxResourceEditorProjectTree::LeftDClick(wxMouseEvent& WXUNUSED(event))
 {
-#if 0
     long sel = GetSelection();
     if (sel == -1)
         return;
@@ -58,16 +57,17 @@ void wxResourceEditorProjectTree::LeftDClick(wxMouseEvent& WXUNUSED(event))
     if (GetItemData(sel) == 0)
         return;
     
-    wxItemResource* res = (wxResourceTreeData *)GetItemData(sel)->GetResource();
+    wxItemResource* res = ((wxResourceTreeData *)GetItemData(sel))->GetResource();
+
     wxString resType(res->GetType());
-    if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel")
-        return;
-    
+
     wxResourceEditorFrame *frame = (wxResourceEditorFrame *)wxWindow::GetParent();
     wxResourceManager *manager = frame->manager;
-    
-    manager->EditSelectedResource();
-#endif
+
+    if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel")
+        manager->GetCurrentResourceManager()->EditWindow(manager->FindWindowForResource(res));
+    else
+        manager->EditSelectedResource();
 }
 
 void wxResourceEditorProjectTree::OnSelChanged(wxTreeEvent& WXUNUSED(event))