Cosmetic and usability enhancements.
- Better menu texts - do not show pad edit options in board editor, when they are used only in the footprint editor.
This commit is contained in:
parent
a643bdff4b
commit
c186e7d391
|
@ -65,12 +65,18 @@ bool PAD_TOOL::Init()
|
|||
// Add context menu entries that are displayed when selection tool is active
|
||||
CONDITIONAL_MENU& menu = selTool->GetToolMenu().GetMenu();
|
||||
|
||||
auto padSel = SELECTION_CONDITIONS::HasType( PCB_PAD_T );
|
||||
auto singlePadSel = SELECTION_CONDITIONS::Count( 1 ) && SELECTION_CONDITIONS::OnlyType( PCB_PAD_T );
|
||||
SELECTION_CONDITION padSel = SELECTION_CONDITIONS::HasType( PCB_PAD_T );
|
||||
SELECTION_CONDITION singlePadSel = SELECTION_CONDITIONS::Count( 1 ) &&
|
||||
SELECTION_CONDITIONS::OnlyType( PCB_PAD_T );
|
||||
|
||||
menu.AddSeparator( 400 );
|
||||
menu.AddItem( PCB_ACTIONS::createPadFromShapes, SELECTION_CONDITIONS::NotEmpty, 400 );
|
||||
menu.AddItem( PCB_ACTIONS::explodePadToShapes, singlePadSel, 400 );
|
||||
|
||||
if( m_editModules )
|
||||
{
|
||||
menu.AddItem( PCB_ACTIONS::createPadFromShapes, SELECTION_CONDITIONS::NotEmpty, 400 );
|
||||
menu.AddItem( PCB_ACTIONS::explodePadToShapes, singlePadSel, 400 );
|
||||
}
|
||||
|
||||
menu.AddItem( PCB_ACTIONS::copyPadSettings, singlePadSel, 400 );
|
||||
menu.AddItem( PCB_ACTIONS::applyPadSettings, padSel, 400 );
|
||||
menu.AddItem( PCB_ACTIONS::pushPadSettings, singlePadSel, 400 );
|
||||
|
@ -418,6 +424,6 @@ void PAD_TOOL::setTransitions()
|
|||
Go( &PAD_TOOL::pastePadProperties, PCB_ACTIONS::applyPadSettings.MakeEvent() );
|
||||
Go( &PAD_TOOL::copyPadSettings, PCB_ACTIONS::copyPadSettings.MakeEvent() );
|
||||
Go( &PAD_TOOL::pushPadSettings, PCB_ACTIONS::pushPadSettings.MakeEvent() );
|
||||
|
||||
|
||||
Go( &PAD_TOOL::EnumeratePads, PCB_ACTIONS::enumeratePads.MakeEvent() );
|
||||
}
|
||||
|
|
|
@ -434,22 +434,25 @@ TOOL_ACTION PCB_ACTIONS::microwaveCreateLine( "pcbnew.MicrowaveTool.createLine",
|
|||
//
|
||||
TOOL_ACTION PCB_ACTIONS::copyPadSettings( "pcbnew.PadTool.CopyPadSettings",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Copy Pad Properties" ), _( "Copy current pad's properties" ),
|
||||
_( "Copy Pad Properties to Default" ), _( "Copy current pad's properties" ),
|
||||
copy_pad_settings_xpm );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::applyPadSettings( "pcbnew.PadTool.ApplyPadSettings",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Paste Pad Properties" ), _( "Replace the current pad's properties with those copied earlier" ),
|
||||
_( "Paste Default Pad Properties to Selected" ),
|
||||
_( "Replace the current pad's properties with those copied earlier" ),
|
||||
apply_pad_settings_xpm );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::pushPadSettings( "pcbnew.PadTool.PushPadSettings",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Push Pad Properties..." ), _( "Copy the current pad's properties to other pads" ),
|
||||
_( "Push Pad Properties to Other Pads..." ),
|
||||
_( "Copy the current pad's properties to other pads" ),
|
||||
push_pad_settings_xpm );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::enumeratePads( "pcbnew.PadTool.enumeratePads",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Renumber Pads..." ), _( "Renumber pads by clicking on them in the desired order" ),
|
||||
_( "Renumber Pads..." ),
|
||||
_( "Renumber pads by clicking on them in the desired order" ),
|
||||
pad_enumerate_xpm, AF_ACTIVATE );
|
||||
|
||||
|
||||
|
|
|
@ -124,7 +124,6 @@ public:
|
|||
SetIcon( locked_xpm );
|
||||
SetTitle( _( "Locking" ) );
|
||||
|
||||
AppendSeparator();
|
||||
Add( PCB_ACTIONS::lock );
|
||||
Add( PCB_ACTIONS::unlock );
|
||||
Add( PCB_ACTIONS::toggleLock );
|
||||
|
|
Loading…
Reference in New Issue