GerbView: Disable legacy-only event handlers when GAL is active
Fixes: lp:1752209 * https://bugs.launchpad.net/kicad/+bug/1752209
This commit is contained in:
parent
01ef0bd2e9
commit
d2c86f8594
|
@ -208,7 +208,14 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
}
|
||||
|
||||
INSTALL_UNBUFFERED_DC( dc, m_canvas );
|
||||
wxClientDC* dc = nullptr;
|
||||
|
||||
if( !IsGalCanvasActive() )
|
||||
{
|
||||
dc = new wxClientDC( m_canvas );
|
||||
m_canvas->DoPrepareDC( *dc );
|
||||
}
|
||||
|
||||
GERBER_DRAW_ITEM* currItem = (GERBER_DRAW_ITEM*) GetScreen()->GetCurItem();
|
||||
|
||||
switch( id )
|
||||
|
@ -255,15 +262,21 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
case ID_POPUP_PLACE_BLOCK:
|
||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_MOVE );
|
||||
m_canvas->SetAutoPanRequest( false );
|
||||
HandleBlockPlace( &dc );
|
||||
if( !IsGalCanvasActive() )
|
||||
{
|
||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_MOVE );
|
||||
m_canvas->SetAutoPanRequest( false );
|
||||
HandleBlockPlace( dc );
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_POPUP_ZOOM_BLOCK:
|
||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_ZOOM );
|
||||
GetScreen()->m_BlockLocate.SetMessageBlock( this );
|
||||
HandleBlockEnd( &dc );
|
||||
if( !IsGalCanvasActive() )
|
||||
{
|
||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_ZOOM );
|
||||
GetScreen()->m_BlockLocate.SetMessageBlock( this );
|
||||
HandleBlockEnd( dc );
|
||||
}
|
||||
break;
|
||||
|
||||
case ID_HIGHLIGHT_CMP_ITEMS:
|
||||
|
|
Loading…
Reference in New Issue