merged 2.4 branch into the trunk
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18040 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -140,8 +140,10 @@ void PreviewFrame::MakeDirty()
|
||||
|
||||
|
||||
|
||||
void PreviewFrame::Preview(wxXmlNode *node,const wxString &version)
|
||||
void PreviewFrame::Preview(wxXmlNode *node, wxXmlDocument *orig_doc)
|
||||
{
|
||||
wxString version = orig_doc->GetRoot()->GetPropVal(wxT("version"), wxT("0.0.0.0"));
|
||||
|
||||
while (node->GetParent()->GetParent() != NULL) node = node->GetParent();
|
||||
|
||||
{
|
||||
@@ -150,6 +152,7 @@ void PreviewFrame::Preview(wxXmlNode *node,const wxString &version)
|
||||
root->AddProperty(new wxXmlProperty(wxT("version"),version,NULL));
|
||||
doc.SetRoot(root);
|
||||
doc.GetRoot()->AddChild(new wxXmlNode(*node));
|
||||
doc.SetFileEncoding(orig_doc->GetFileEncoding());
|
||||
|
||||
if (XmlGetClass(doc.GetRoot()->GetChildren()) == _T("wxDialog"))
|
||||
XmlSetClass(doc.GetRoot()->GetChildren(), _T("wxPanel"));
|
||||
@@ -168,7 +171,7 @@ void PreviewFrame::Preview(wxXmlNode *node,const wxString &version)
|
||||
}
|
||||
|
||||
m_Node = node;
|
||||
m_Version = version;
|
||||
m_Doc = orig_doc;
|
||||
|
||||
m_LogCtrl->Clear();
|
||||
wxLogTextCtrl mylog(m_LogCtrl);
|
||||
@@ -237,5 +240,5 @@ END_EVENT_TABLE()
|
||||
|
||||
void PreviewFrame::OnMouseEnter(wxMouseEvent& event)
|
||||
{
|
||||
if (m_Dirty) Preview(m_Node,m_Version);
|
||||
if (m_Dirty) Preview(m_Node,m_Doc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user