Dialog Editor bug fixes, old resource conversion, additional layout helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7237 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -38,13 +38,13 @@
|
||||
#include "reseditr.h"
|
||||
|
||||
BEGIN_EVENT_TABLE(wxResourceEditorProjectTree, wxTreeCtrl)
|
||||
EVT_LEFT_DCLICK(wxResourceEditorProjectTree::LeftDClick)
|
||||
EVT_TREE_SEL_CHANGED(IDC_TREECTRL, wxResourceEditorProjectTree::OnSelChanged)
|
||||
EVT_LEFT_DCLICK(wxResourceEditorProjectTree::LeftDClick)
|
||||
EVT_TREE_SEL_CHANGED(IDC_TREECTRL, wxResourceEditorProjectTree::OnSelChanged)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
wxResourceEditorProjectTree::wxResourceEditorProjectTree(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
||||
long style):
|
||||
wxTreeCtrl(parent, id, pos, size, style)
|
||||
long style):
|
||||
wxTreeCtrl(parent, id, pos, size, style)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -54,18 +54,18 @@ void wxResourceEditorProjectTree::LeftDClick(wxMouseEvent& WXUNUSED(event))
|
||||
long sel = GetSelection();
|
||||
if (sel == -1)
|
||||
return;
|
||||
|
||||
|
||||
if (GetItemData(sel) == 0)
|
||||
return;
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
@@ -75,18 +75,18 @@ void wxResourceEditorProjectTree::OnSelChanged(wxTreeEvent& WXUNUSED(event))
|
||||
long sel = GetSelection();
|
||||
if (sel == -1)
|
||||
return;
|
||||
|
||||
|
||||
if (GetItemData(sel) == 0)
|
||||
return;
|
||||
|
||||
|
||||
if (m_invalid)
|
||||
return;
|
||||
|
||||
|
||||
wxItemResource* res = ((wxResourceTreeData *)GetItemData(sel))->GetResource();
|
||||
wxString resType(res->GetType());
|
||||
if (resType != "wxDialog" && resType != "wxDialogBox" && resType != "wxPanel")
|
||||
return;
|
||||
|
||||
|
||||
wxResourceManager::GetCurrentResourceManager()->Edit(res);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user