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
This commit is contained in:
George Tasker
2000-12-19 17:22:46 +00:00
parent 2e907fab47
commit 4158c64a7e

View File

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