From f2055f6c5d1f9e8facee6604594bf44574362f62 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 19 Aug 2013 09:08:13 +0200 Subject: [PATCH] Pl_Editor: fix crash on Linux when closing Pl_Editor --- pagelayout_editor/pl_editor_frame.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 6cd2d4522c..a517ae2a39 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -66,8 +66,8 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( wxWindow* aParent, const wxString& aTitle, m_HotkeysZoomAndGridList = s_PlEditor_Hokeys_Descr; m_originSelectChoice = 0; - m_designTreeWidth = 100; - m_propertiesFrameWidth = 150; + m_designTreeWidth = 150; + m_propertiesFrameWidth = 200; if( m_canvas ) m_canvas->SetEnableBlockCommands( false ); @@ -178,7 +178,6 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( wxWindow* aParent, const wxString& aTitle, PL_EDITOR_FRAME::~PL_EDITOR_FRAME() { - wxGetApp().SaveCurrentSetupValues( m_configSettings ); } @@ -230,8 +229,14 @@ void PL_EDITOR_FRAME::OnCloseWindow( wxCloseEvent& Event ) } SaveSettings(); + wxGetApp().SaveCurrentSetupValues( m_configSettings ); + // do not show the window because we do not want any paint event Show( false ); + + // On Linux, m_propertiesPagelayout must be destroyed + // before deleting the main frame to avoid a crash when closing + m_propertiesPagelayout->Destroy(); Destroy(); }