From 1959af1ad18c35194641573b4ecbb465edaca3c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Sun, 5 Nov 2017 22:09:56 +0100 Subject: [PATCH] refactoring: forgot to add VIEW/VIEW_CONTROLS initialization in gerber, causig a crash. Fixing. --- gerbview/gerbview_draw_panel_gal.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gerbview/gerbview_draw_panel_gal.cpp b/gerbview/gerbview_draw_panel_gal.cpp index c506099cad..4f54786246 100644 --- a/gerbview/gerbview_draw_panel_gal.cpp +++ b/gerbview/gerbview_draw_panel_gal.cpp @@ -36,11 +36,17 @@ GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWin KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) : EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalType ) { - setDefaultLayerDeps(); + m_view = new KIGFX::VIEW( true ); + m_view->SetGAL( m_gal ); m_painter.reset( new KIGFX::GERBVIEW_PAINTER( m_gal ) ); m_view->SetPainter( m_painter.get() ); + m_viewControls = new KIGFX::WX_VIEW_CONTROLS( m_view, this ); + + setDefaultLayerDeps(); + + // Load display options (such as filled/outline display of items). auto frame = static_cast< GERBVIEW_FRAME* >( GetParentEDAFrame() );