Dialog Editor bug fixes, several other small ones

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-11-03 15:43:57 +00:00
parent 64d315544f
commit 386af6a2fa
10 changed files with 78 additions and 35 deletions

View File

@@ -1020,7 +1020,7 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *
if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
{
wxPoint pt = panel->ConvertPixelsToDialog(pt);
wxPoint pt = panel->ConvertPixelsToDialog(wxPoint(x, y));
res->SetSize(pt.x, pt.y, -1, -1);
}
else res->SetSize(x, y, -1, -1);
@@ -1159,6 +1159,16 @@ bool wxResourceManager::CreatePanelItem(wxItemResource *panelResource, wxPanel *
if (!newItem)
return FALSE;
int actualW, actualH;
newItem->GetSize(&actualW, &actualH);
wxSize actualSize(actualW, actualH);
if ((panelResource->GetResourceStyle() & wxRESOURCE_DIALOG_UNITS) != 0)
{
actualSize = panel->ConvertPixelsToDialog(actualSize);
}
res->SetSize(res->GetX(), res->GetY(), actualSize.x, actualSize.y);
wxString newIdName;
int id = GenerateWindowId(prefix, newIdName);
res->SetId(id);
@@ -1759,7 +1769,7 @@ wxWindow *wxResourceManager::RecreateWindowFromResource(wxWindow *win, wxWindowP
wxWindow *parent = win->GetParent();
wxItemResource* parentResource = NULL;
if (parent)
FindResourceForWindow(parent);
parentResource = FindResourceForWindow(parent);
if (win->IsKindOf(CLASSINFO(wxPanel)))
{