+
+ long selParent = wxTreeCtrl::GetParent(sel);
+
+ wxWindow *win = NULL;
+ if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel")
+ {
+ win = manager->FindWindowForResource(res);
+
+ // Check to see if the item selected in on the current dialog being
+ // displayed. If not, then we will have to find the items parent dialog
+ if (!win)
+ {
+ // The item is on a dialog other than the one currently being
+ // shown/worked on, so find the parent dialog, switch to use
+ // its resource manager, and then find the window in the dialog
+ wxItemResource* resParent = ((wxResourceTreeData *)GetItemData(selParent))->GetResource();
+ wxResourceManager::GetCurrentResourceManager()->Edit(resParent);
+ win = manager->FindWindowForResource(res);
+ }
+
+ if (win)
+ manager->GetCurrentResourceManager()->EditWindow(win);
+ }
+ else
+ {
+// manager->EditSelectedResource();
+ win = manager->FindWindowForResource(res);
+ wxResourceManager::GetCurrentResourceManager()->EditWindow(win);
+ }
+
+
+} // wxResourceEditorProjectTree::LeftDClick()
+