From b07e5c63bf05c6d95e360470d85cd23ce9897b36 Mon Sep 17 00:00:00 2001 From: wowzaman12 Date: Sat, 28 Mar 2015 13:54:49 +0000 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 f6b9817b..a395e017 100644 --- a/src/wx/guiinit.cpp +++ b/src/wx/guiinit.cpp @@ -1972,6 +1972,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; }