refactoring: forgot to add VIEW/VIEW_CONTROLS initialization in gerber, causig a crash. Fixing.

This commit is contained in:
Tomasz Włostowski 2017-11-05 22:09:56 +01:00
parent 78fa31315c
commit 1959af1ad1
1 changed files with 7 additions and 1 deletions

View File

@ -36,11 +36,17 @@ GERBVIEW_DRAW_PANEL_GAL::GERBVIEW_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWin
KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) : KIGFX::GAL_DISPLAY_OPTIONS& aOptions, GAL_TYPE aGalType ) :
EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, 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_painter.reset( new KIGFX::GERBVIEW_PAINTER( m_gal ) );
m_view->SetPainter( m_painter.get() ); 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). // Load display options (such as filled/outline display of items).
auto frame = static_cast< GERBVIEW_FRAME* >( GetParentEDAFrame() ); auto frame = static_cast< GERBVIEW_FRAME* >( GetParentEDAFrame() );