Pcbnew, place menu: some enhancements:
- move place dimensions to a sub menu (they are not frequently used, and it reduce the size of the place menu - add reset drill origin, similar to reset grid origin.
This commit is contained in:
parent
b698ddc82c
commit
ed1924b975
|
@ -313,11 +313,15 @@ void PCB_EDIT_FRAME::doReCreateMenuBar()
|
||||||
placeMenu->Add( PCB_ACTIONS::drawTextBox );
|
placeMenu->Add( PCB_ACTIONS::drawTextBox );
|
||||||
|
|
||||||
placeMenu->AppendSeparator();
|
placeMenu->AppendSeparator();
|
||||||
placeMenu->Add( PCB_ACTIONS::drawAlignedDimension );
|
ACTION_MENU* dimensionSubmenu = new ACTION_MENU( false, selTool );
|
||||||
placeMenu->Add( PCB_ACTIONS::drawOrthogonalDimension );
|
dimensionSubmenu->SetTitle( _( "Add Dimension" ) );
|
||||||
placeMenu->Add( PCB_ACTIONS::drawCenterDimension );
|
dimensionSubmenu->SetIcon( BITMAPS::add_aligned_dimension );
|
||||||
placeMenu->Add( PCB_ACTIONS::drawRadialDimension );
|
dimensionSubmenu->Add( PCB_ACTIONS::drawAlignedDimension );
|
||||||
placeMenu->Add( PCB_ACTIONS::drawLeader );
|
dimensionSubmenu->Add( PCB_ACTIONS::drawOrthogonalDimension );
|
||||||
|
dimensionSubmenu->Add( PCB_ACTIONS::drawCenterDimension );
|
||||||
|
dimensionSubmenu->Add( PCB_ACTIONS::drawRadialDimension );
|
||||||
|
dimensionSubmenu->Add( PCB_ACTIONS::drawLeader );
|
||||||
|
placeMenu->Add( dimensionSubmenu );
|
||||||
|
|
||||||
placeMenu->AppendSeparator();
|
placeMenu->AppendSeparator();
|
||||||
placeMenu->Add( PCB_ACTIONS::placeCharacteristics );
|
placeMenu->Add( PCB_ACTIONS::placeCharacteristics );
|
||||||
|
@ -325,12 +329,11 @@ void PCB_EDIT_FRAME::doReCreateMenuBar()
|
||||||
|
|
||||||
placeMenu->AppendSeparator();
|
placeMenu->AppendSeparator();
|
||||||
placeMenu->Add( PCB_ACTIONS::drillOrigin );
|
placeMenu->Add( PCB_ACTIONS::drillOrigin );
|
||||||
|
placeMenu->Add( PCB_ACTIONS::drillResetOrigin );
|
||||||
placeMenu->Add( ACTIONS::gridSetOrigin );
|
placeMenu->Add( ACTIONS::gridSetOrigin );
|
||||||
placeMenu->AppendSeparator();
|
|
||||||
placeMenu->Add( ACTIONS::gridResetOrigin );
|
placeMenu->Add( ACTIONS::gridResetOrigin );
|
||||||
|
|
||||||
placeMenu->AppendSeparator();
|
placeMenu->AppendSeparator();
|
||||||
|
|
||||||
ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
|
ACTION_MENU* autoplaceSubmenu = new ACTION_MENU( false, selTool );
|
||||||
autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
|
autoplaceSubmenu->SetTitle( _( "Auto-Place Footprints" ) );
|
||||||
autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
|
autoplaceSubmenu->SetIcon( BITMAPS::mode_module );
|
||||||
|
|
|
@ -1598,6 +1598,13 @@ void BOARD_EDITOR_CONTROL::DoSetDrillOrigin( KIGFX::VIEW* aView, PCB_BASE_FRAME*
|
||||||
|
|
||||||
int BOARD_EDITOR_CONTROL::DrillOrigin( const TOOL_EVENT& aEvent )
|
int BOARD_EDITOR_CONTROL::DrillOrigin( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
|
if( aEvent.IsAction( &PCB_ACTIONS::drillResetOrigin ) )
|
||||||
|
{
|
||||||
|
m_frame->SaveCopyInUndoList( m_placeOrigin.get(), UNDO_REDO::GRIDORIGIN );
|
||||||
|
DoSetDrillOrigin( getView(), m_frame, m_placeOrigin.get(), VECTOR2D( 0, 0 ) );
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
PCB_PICKER_TOOL* picker = m_toolMgr->GetTool<PCB_PICKER_TOOL>();
|
PCB_PICKER_TOOL* picker = m_toolMgr->GetTool<PCB_PICKER_TOOL>();
|
||||||
|
|
||||||
// Deactivate other tools; particularly important if another PICKER is currently running
|
// Deactivate other tools; particularly important if another PICKER is currently running
|
||||||
|
@ -1662,6 +1669,7 @@ void BOARD_EDITOR_CONTROL::setTransitions()
|
||||||
// Placing tools
|
// Placing tools
|
||||||
Go( &BOARD_EDITOR_CONTROL::PlaceFootprint, PCB_ACTIONS::placeFootprint.MakeEvent() );
|
Go( &BOARD_EDITOR_CONTROL::PlaceFootprint, PCB_ACTIONS::placeFootprint.MakeEvent() );
|
||||||
Go( &BOARD_EDITOR_CONTROL::DrillOrigin, PCB_ACTIONS::drillOrigin.MakeEvent() );
|
Go( &BOARD_EDITOR_CONTROL::DrillOrigin, PCB_ACTIONS::drillOrigin.MakeEvent() );
|
||||||
|
Go( &BOARD_EDITOR_CONTROL::DrillOrigin, PCB_ACTIONS::drillResetOrigin.MakeEvent() );
|
||||||
|
|
||||||
Go( &BOARD_EDITOR_CONTROL::EditFpInFpEditor, PCB_ACTIONS::editFpInFpEditor.MakeEvent() );
|
Go( &BOARD_EDITOR_CONTROL::EditFpInFpEditor, PCB_ACTIONS::editFpInFpEditor.MakeEvent() );
|
||||||
Go( &BOARD_EDITOR_CONTROL::EditFpInFpEditor, PCB_ACTIONS::editLibFpInFpEditor.MakeEvent() );
|
Go( &BOARD_EDITOR_CONTROL::EditFpInFpEditor, PCB_ACTIONS::editLibFpInFpEditor.MakeEvent() );
|
||||||
|
|
|
@ -1147,6 +1147,12 @@ TOOL_ACTION PCB_ACTIONS::drillOrigin( TOOL_ACTION_ARGS()
|
||||||
.Icon( BITMAPS::set_origin )
|
.Icon( BITMAPS::set_origin )
|
||||||
.Flags( AF_ACTIVATE ) );
|
.Flags( AF_ACTIVATE ) );
|
||||||
|
|
||||||
|
TOOL_ACTION PCB_ACTIONS::drillResetOrigin( TOOL_ACTION_ARGS()
|
||||||
|
.Name( "pcbnew.EditorControl.drillResetOrigin" )
|
||||||
|
.Scope( AS_GLOBAL )
|
||||||
|
.LegacyHotkeyName( "Reset Drill Origin" )
|
||||||
|
.FriendlyName( _( "Reset Drill Origin" ) ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::toggleLock( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::toggleLock( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.EditorControl.toggleLock" )
|
.Name( "pcbnew.EditorControl.toggleLock" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
|
|
|
@ -528,6 +528,7 @@ public:
|
||||||
static TOOL_ACTION pickerTool;
|
static TOOL_ACTION pickerTool;
|
||||||
static TOOL_ACTION measureTool;
|
static TOOL_ACTION measureTool;
|
||||||
static TOOL_ACTION drillOrigin;
|
static TOOL_ACTION drillOrigin;
|
||||||
|
static TOOL_ACTION drillResetOrigin;
|
||||||
static TOOL_ACTION placeFileOrigin;
|
static TOOL_ACTION placeFileOrigin;
|
||||||
static TOOL_ACTION appendBoard;
|
static TOOL_ACTION appendBoard;
|
||||||
static TOOL_ACTION showEeschema;
|
static TOOL_ACTION showEeschema;
|
||||||
|
|
Loading…
Reference in New Issue