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;
|
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();
|
GERBER_DRAW_ITEM* currItem = (GERBER_DRAW_ITEM*) GetScreen()->GetCurItem();
|
||||||
|
|
||||||
switch( id )
|
switch( id )
|
||||||
|
@ -255,15 +262,21 @@ void GERBVIEW_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_PLACE_BLOCK:
|
case ID_POPUP_PLACE_BLOCK:
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_MOVE );
|
if( !IsGalCanvasActive() )
|
||||||
m_canvas->SetAutoPanRequest( false );
|
{
|
||||||
HandleBlockPlace( &dc );
|
GetScreen()->m_BlockLocate.SetCommand( BLOCK_MOVE );
|
||||||
|
m_canvas->SetAutoPanRequest( false );
|
||||||
|
HandleBlockPlace( dc );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_POPUP_ZOOM_BLOCK:
|
case ID_POPUP_ZOOM_BLOCK:
|
||||||
GetScreen()->m_BlockLocate.SetCommand( BLOCK_ZOOM );
|
if( !IsGalCanvasActive() )
|
||||||
GetScreen()->m_BlockLocate.SetMessageBlock( this );
|
{
|
||||||
HandleBlockEnd( &dc );
|
GetScreen()->m_BlockLocate.SetCommand( BLOCK_ZOOM );
|
||||||
|
GetScreen()->m_BlockLocate.SetMessageBlock( this );
|
||||||
|
HandleBlockEnd( dc );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_HIGHLIGHT_CMP_ITEMS:
|
case ID_HIGHLIGHT_CMP_ITEMS:
|
||||||
|
|
Loading…
Reference in New Issue