From: George Tasker Date: Tue, 19 Dec 2000 17:22:46 +0000 (+0000) Subject: Left Double clicking a widget (not a dialog) in the left hand TREE pane will now... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/4158c64a7e90184dfa429a9d2690c5384906c1e2?ds=inline Left Double clicking a widget (not a dialog) in the left hand TREE pane will now pop up the EDIT PROPERTIES dialog for the widget git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/utils/dialoged/src/edtree.cpp b/utils/dialoged/src/edtree.cpp index 168fa100cd..2e9d0e5df0 100644 --- a/utils/dialoged/src/edtree.cpp +++ b/utils/dialoged/src/edtree.cpp @@ -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))