2 Minor fixes in GAL mode: when switching from legacy to gal, use now the latest display options.
Use hotkey defined by user to reset local coordinates in GAL (instead of the hard coded space key)
This commit is contained in:
parent
1ada4863fc
commit
1fab667cf7
|
@ -976,6 +976,12 @@ void PCB_BASE_FRAME::UseGalCanvas( bool aEnable )
|
||||||
if( m_toolManager )
|
if( m_toolManager )
|
||||||
m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH );
|
m_toolManager->ResetTools( TOOL_BASE::GAL_SWITCH );
|
||||||
|
|
||||||
|
// Transfer latets current display options from legacy to GAL canvas:
|
||||||
|
auto painter = static_cast<KIGFX::PCB_PAINTER*>( galCanvas->GetView()->GetPainter() );
|
||||||
|
auto settings = painter->GetSettings();
|
||||||
|
DISPLAY_OPTIONS* displ_opts = (DISPLAY_OPTIONS*)GetDisplayOptions();
|
||||||
|
settings->LoadDisplayOptions( displ_opts );
|
||||||
|
|
||||||
galCanvas->GetView()->RecacheAllItems();
|
galCanvas->GetView()->RecacheAllItems();
|
||||||
galCanvas->SetEventDispatcher( m_toolDispatcher );
|
galCanvas->SetEventDispatcher( m_toolDispatcher );
|
||||||
galCanvas->StartDrawing();
|
galCanvas->StartDrawing();
|
||||||
|
|
|
@ -202,7 +202,7 @@ TOOL_ACTION PCB_ACTIONS::zoomTool( "pcbnew.Control.zoomTool",
|
||||||
_( "Zoom to Selection" ), "", NULL, AF_ACTIVATE );
|
_( "Zoom to Selection" ), "", NULL, AF_ACTIVATE );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::resetCoords( "pcbnew.Control.resetCoords",
|
TOOL_ACTION PCB_ACTIONS::resetCoords( "pcbnew.Control.resetCoords",
|
||||||
AS_GLOBAL, ' ',
|
AS_GLOBAL, TOOL_ACTION::LegacyHotKey( HK_RESET_LOCAL_COORD ),
|
||||||
"", "" );
|
"", "" );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::switchCursor( "pcbnew.Control.switchCursor",
|
TOOL_ACTION PCB_ACTIONS::switchCursor( "pcbnew.Control.switchCursor",
|
||||||
|
|
Loading…
Reference in New Issue