From 125b26a4840dfa04d710d17f974c2510064c506f Mon Sep 17 00:00:00 2001 From: Arthur Moore Date: Mon, 12 Jan 2015 02:18:44 -0500 Subject: [PATCH] Make sure that all loaded xrc dialogs have the correct parent This might be overkill, but shouldn't hurt. --- src/wx/guiinit.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wx/guiinit.cpp b/src/wx/guiinit.cpp index 6a5329de..da282689 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -2082,6 +2082,13 @@ wxDialog * MainFrame::LoadXRCDialog(const char * name) wxString dname = wxString::FromUTF8(name); wxDialog * dialog = wxXmlResource::Get()->LoadDialog(this, dname); CheckThrowXRCError(dialog,name); + + /* wx-2.9.1 doesn't set parent for propertysheetdialogs for some reason */ + /* this will generate a gtk warning but it is necessary for later */ + /* retrieval using FindWindow() */ + if(!dialog->GetParent()) + dialog->Reparent(this); + mark_recursive(dialog); return dialog; } wxPropertySheetDialog * MainFrame::LoadXRCropertySheetDialog(const char * name)