Make MMB double click perform 'Zoom to Fit'
ADDED: Make middle mouse button double click do a 'Zoom to Fit' in Eeschema, Pcbnew, and Gerbview. Ctrl-MMB does a 'Zoom to Objects' in Eeschema. Fixes https://gitlab.com/kicad/code/kicad/issues/1988
This commit is contained in:
parent
f47d81af85
commit
e77b7e3360
|
@ -360,6 +360,15 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
m_toolMgr->RunAction( EE_ACTIONS::properties );
|
||||
}
|
||||
|
||||
// Middle double click? Do zoom to fit or zoom to objects
|
||||
else if( evt->IsDblClick( BUT_MIDDLE ) )
|
||||
{
|
||||
if( m_exclusive_or ) // Is CTRL key down?
|
||||
m_toolMgr->RunAction( ACTIONS::zoomFitObjects, true );
|
||||
else
|
||||
m_toolMgr->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
}
|
||||
|
||||
// drag with LMB? Select multiple objects (or at least draw a selection box) or drag them
|
||||
else if( evt->IsDrag( BUT_LEFT ) )
|
||||
{
|
||||
|
|
|
@ -214,6 +214,12 @@ int GERBVIEW_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
m_menu.ShowContextMenu( m_selection );
|
||||
}
|
||||
|
||||
// Middle double click? Do zoom to fit
|
||||
else if( evt->IsDblClick( BUT_MIDDLE ) )
|
||||
{
|
||||
m_toolMgr->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
}
|
||||
|
||||
else if( evt->IsCancel() || evt->Action() == TA_UNDO_REDO_PRE )
|
||||
{
|
||||
clearSelection();
|
||||
|
|
|
@ -274,6 +274,12 @@ int SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
// Middle double click? Do zoom to fit
|
||||
else if( evt->IsDblClick( BUT_MIDDLE ) )
|
||||
{
|
||||
m_toolMgr->RunAction( ACTIONS::zoomFitScreen, true );
|
||||
}
|
||||
|
||||
// drag with LMB? Select multiple objects (or at least draw a selection box) or drag them
|
||||
else if( evt->IsDrag( BUT_LEFT ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue