Setup painter in PCB_DRAW_PANEL_GAL instead of EDA_DRAW_PANEL_GAL
This commit is contained in:
parent
9375e18fb6
commit
7058e4eb21
|
@ -73,10 +73,7 @@ EDA_DRAW_PANEL_GAL::EDA_DRAW_PANEL_GAL( wxWindow* aParentWindow, wxWindowID aWin
|
|||
#endif
|
||||
EnableScrolling( false, false ); // otherwise Zoom Auto disables GAL canvas
|
||||
|
||||
m_painter = new KIGFX::PCB_PAINTER( m_gal );
|
||||
|
||||
m_view = new KIGFX::VIEW( true );
|
||||
m_view->SetPainter( m_painter );
|
||||
m_view->SetGAL( m_gal );
|
||||
|
||||
Connect( wxEVT_SIZE, wxSizeEventHandler( EDA_DRAW_PANEL_GAL::onSize ), NULL, this );
|
||||
|
@ -131,7 +128,6 @@ EDA_DRAW_PANEL_GAL::~EDA_DRAW_PANEL_GAL()
|
|||
|
||||
assert( !m_drawing );
|
||||
|
||||
delete m_painter;
|
||||
delete m_viewControls;
|
||||
delete m_view;
|
||||
delete m_gal;
|
||||
|
@ -165,6 +161,8 @@ void EDA_DRAW_PANEL_GAL::onPaint( wxPaintEvent& WXUNUSED( aEvent ) )
|
|||
PROF_COUNTER totalRealTime;
|
||||
#endif /* PROFILE */
|
||||
|
||||
wxASSERT( m_painter );
|
||||
|
||||
m_drawing = true;
|
||||
KIGFX::PCB_RENDER_SETTINGS* settings = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( m_painter->GetSettings() );
|
||||
|
||||
|
|
|
@ -107,6 +107,9 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalTy
|
|||
setDefaultLayerOrder();
|
||||
setDefaultLayerDeps();
|
||||
|
||||
m_painter = new KIGFX::PCB_PAINTER( m_gal );
|
||||
m_view->SetPainter( m_painter );
|
||||
|
||||
// Load display options (such as filled/outline display of items).
|
||||
// Can be made only if the parent window is an EDA_DRAW_FRAME (or a derived class)
|
||||
// which is not always the case (namely when it is used from a wxDialog like the pad editor)
|
||||
|
@ -122,6 +125,7 @@ EDA_DRAW_PANEL_GAL( aParentWindow, aWindowId, aPosition, aSize, aOptions, aGalTy
|
|||
|
||||
PCB_DRAW_PANEL_GAL::~PCB_DRAW_PANEL_GAL()
|
||||
{
|
||||
delete m_painter;
|
||||
delete m_worksheet;
|
||||
delete m_ratsnest;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue