Hook up panning options to GAL canvas.
This commit is contained in:
parent
5b602d02ab
commit
98296334fd
|
@ -185,6 +185,32 @@ bool SCH_DRAW_PANEL::SwitchBackend( GAL_TYPE aGalType )
|
|||
}
|
||||
|
||||
|
||||
void SCH_DRAW_PANEL::SetEnableMousewheelPan( bool aEnable )
|
||||
{
|
||||
m_enableMousewheelPan = aEnable;
|
||||
|
||||
if( GetParent()->IsGalCanvasActive() )
|
||||
GetParent()->GetGalCanvas()->GetViewControls()->EnableMousewheelPan( aEnable );
|
||||
}
|
||||
|
||||
|
||||
void SCH_DRAW_PANEL::SetEnableAutoPan( bool aEnable )
|
||||
{
|
||||
m_enableAutoPan = aEnable;
|
||||
|
||||
if( GetParent()->IsGalCanvasActive() )
|
||||
GetParent()->GetGalCanvas()->GetViewControls()->EnableAutoPan( aEnable );
|
||||
}
|
||||
|
||||
|
||||
void SCH_DRAW_PANEL::SetEnableZoomNoCenter( bool aEnable )
|
||||
{
|
||||
m_enableZoomNoCenter = aEnable;
|
||||
|
||||
if( GetParent()->IsGalCanvasActive() )
|
||||
GetParent()->GetGalCanvas()->GetViewControls()->EnableCursorWarping( !aEnable );
|
||||
}
|
||||
|
||||
|
||||
void SCH_DRAW_PANEL::setDefaultLayerDeps()
|
||||
{
|
||||
|
|
|
@ -62,6 +62,10 @@ public:
|
|||
void OnKeyEvent( wxKeyEvent& event );
|
||||
void OnCharHook( wxKeyEvent& event );
|
||||
|
||||
void SetEnableMousewheelPan( bool aEnable ) override;
|
||||
void SetEnableZoomNoCenter( bool aEnable ) override;
|
||||
void SetEnableAutoPan( bool aEnable ) override;
|
||||
|
||||
BASE_SCREEN* GetScreen() override;
|
||||
virtual EDA_DRAW_FRAME* GetParent() const override;
|
||||
|
||||
|
|
Loading…
Reference in New Issue