From cb83f8acdfdfc1f7659e7e87d2e0696520150bc9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 3 Jun 2019 09:39:48 +0200 Subject: [PATCH] Cvpcb: fix incorrect size of message panel. It was due to the fact the frame size was set before the draw canvas panel was created, thus creating incorrect size of the other panel (the message panel) Fixes: lp:1831389 https://bugs.launchpad.net/kicad/+bug/1831389 --- cvpcb/display_footprints_frame.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index b80cd44b6e..3e68758fae 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -108,8 +108,6 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa // Track and via clearance has no meaning here. displ_opts->m_ShowTrackClearanceMode = PCB_DISPLAY_OPTIONS::DO_NOT_SHOW_CLEARANCE; - SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); - // Create GAL canvas #ifdef __WXMAC__ // Cairo renderer doesn't handle Retina displays @@ -121,6 +119,9 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa GetGalDisplayOptions(), backend ); SetGalCanvas( gal_drawPanel ); + // Now all panels are created, set the window size to the latest saved in config: + SetSize( m_FramePos.x, m_FramePos.y, m_FrameSize.x, m_FrameSize.y ); + // Create the manager and dispatcher & route draw panel events to the dispatcher m_toolManager = new TOOL_MANAGER; m_toolManager->SetEnvironment( GetBoard(), gal_drawPanel->GetView(), @@ -146,12 +147,9 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa m_auimgr.SetArtProvider( new EDA_DOCKART() ); m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" ).Top().Layer(6) ); - m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) ); - m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" ).Left().Layer(3) ); - m_auimgr.AddPane( GetGalCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" ).Center() ); - + m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" ).Bottom().Layer(6) ); m_auimgr.Update(); auto& galOpts = GetGalDisplayOptions();