parent
f161a1eaac
commit
23c2104ffa
|
@ -1348,7 +1348,7 @@ TOOL_ACTION EE_ACTIONS::drag( TOOL_ACTION_ARGS()
|
||||||
TOOL_ACTION EE_ACTIONS::alignToGrid( TOOL_ACTION_ARGS()
|
TOOL_ACTION EE_ACTIONS::alignToGrid( TOOL_ACTION_ARGS()
|
||||||
.Name( "eeschema.AlignToGrid" )
|
.Name( "eeschema.AlignToGrid" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Align Elements to Grid" ) )
|
.FriendlyName( _( "Align Items to Grid" ) )
|
||||||
.Icon( BITMAPS::align_elements_to_grid )
|
.Icon( BITMAPS::align_elements_to_grid )
|
||||||
.Flags( AF_ACTIVATE ) );
|
.Flags( AF_ACTIVATE ) );
|
||||||
|
|
||||||
|
|
|
@ -1578,7 +1578,7 @@ void SCH_MOVE_TOOL::moveItem( EDA_ITEM* aItem, const VECTOR2I& aDelta )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int SCH_MOVE_TOOL::AlignElements( const TOOL_EVENT& aEvent )
|
int SCH_MOVE_TOOL::AlignToGrid( const TOOL_EVENT& aEvent )
|
||||||
{
|
{
|
||||||
EE_GRID_HELPER grid( m_toolMgr);
|
EE_GRID_HELPER grid( m_toolMgr);
|
||||||
EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::MovableItems );
|
EE_SELECTION& selection = m_selectionTool->RequestSelection( EE_COLLECTOR::MovableItems );
|
||||||
|
@ -1750,7 +1750,7 @@ int SCH_MOVE_TOOL::AlignElements( const TOOL_EVENT& aEvent )
|
||||||
m_toolMgr->PostEvent( EVENTS::SelectedItemsMoved );
|
m_toolMgr->PostEvent( EVENTS::SelectedItemsMoved );
|
||||||
|
|
||||||
m_frame->SchematicCleanUp( &commit );
|
m_frame->SchematicCleanUp( &commit );
|
||||||
commit.Push( _( "Align" ) );
|
commit.Push( _( "Align Items to Grid" ) );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1772,7 +1772,7 @@ void SCH_MOVE_TOOL::setTransitions()
|
||||||
{
|
{
|
||||||
Go( &SCH_MOVE_TOOL::Main, EE_ACTIONS::move.MakeEvent() );
|
Go( &SCH_MOVE_TOOL::Main, EE_ACTIONS::move.MakeEvent() );
|
||||||
Go( &SCH_MOVE_TOOL::Main, EE_ACTIONS::drag.MakeEvent() );
|
Go( &SCH_MOVE_TOOL::Main, EE_ACTIONS::drag.MakeEvent() );
|
||||||
Go( &SCH_MOVE_TOOL::AlignElements, EE_ACTIONS::alignToGrid.MakeEvent() );
|
Go( &SCH_MOVE_TOOL::AlignToGrid, EE_ACTIONS::alignToGrid.MakeEvent() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
* @param aEvent current event that activated the tool
|
* @param aEvent current event that activated the tool
|
||||||
* @return 0
|
* @return 0
|
||||||
*/
|
*/
|
||||||
int AlignElements( const TOOL_EVENT& aEvent );
|
int AlignToGrid( const TOOL_EVENT& aEvent );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool doMoveSelection( const TOOL_EVENT& aEvent, SCH_COMMIT* aCommit, bool aIsSlice );
|
bool doMoveSelection( const TOOL_EVENT& aEvent, SCH_COMMIT* aCommit, bool aIsSlice );
|
||||||
|
|
|
@ -1921,56 +1921,56 @@ TOOL_ACTION PCB_ACTIONS::alignTop( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.alignTop" )
|
.Name( "pcbnew.AlignAndDistribute.alignTop" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Align to Top" ) )
|
.FriendlyName( _( "Align to Top" ) )
|
||||||
.Tooltip( _( "Aligns selected items to the top edge" ) )
|
.Tooltip( _( "Aligns selected items to the top edge of the item under the cursor" ) )
|
||||||
.Icon( BITMAPS::align_items_top ) );
|
.Icon( BITMAPS::align_items_top ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::alignBottom( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::alignBottom( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.alignBottom" )
|
.Name( "pcbnew.AlignAndDistribute.alignBottom" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Align to Bottom" ) )
|
.FriendlyName( _( "Align to Bottom" ) )
|
||||||
.Tooltip( _( "Aligns selected items to the bottom edge" ) )
|
.Tooltip( _( "Aligns selected items to the bottom edge of the item under the cursor" ) )
|
||||||
.Icon( BITMAPS::align_items_bottom ) );
|
.Icon( BITMAPS::align_items_bottom ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::alignLeft( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::alignLeft( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.alignLeft" )
|
.Name( "pcbnew.AlignAndDistribute.alignLeft" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Align to Left" ) )
|
.FriendlyName( _( "Align to Left" ) )
|
||||||
.Tooltip( _( "Aligns selected items to the left edge" ) )
|
.Tooltip( _( "Aligns selected items to the left edge of the item under the cursor" ) )
|
||||||
.Icon( BITMAPS::align_items_left ) );
|
.Icon( BITMAPS::align_items_left ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::alignRight( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::alignRight( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.alignRight" )
|
.Name( "pcbnew.AlignAndDistribute.alignRight" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Align to Right" ) )
|
.FriendlyName( _( "Align to Right" ) )
|
||||||
.Tooltip( _( "Aligns selected items to the right edge" ) )
|
.Tooltip( _( "Aligns selected items to the right edge of the item under the cursor" ) )
|
||||||
.Icon( BITMAPS::align_items_right ) );
|
.Icon( BITMAPS::align_items_right ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::alignCenterY( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::alignCenterY( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.alignCenterY" )
|
.Name( "pcbnew.AlignAndDistribute.alignCenterY" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Align to Vertical Center" ) )
|
.FriendlyName( _( "Align to Vertical Center" ) )
|
||||||
.Tooltip( _( "Aligns selected items to the vertical center" ) )
|
.Tooltip( _( "Aligns selected items to the vertical center of the item under the cursor" ) )
|
||||||
.Icon( BITMAPS::align_items_center ) );
|
.Icon( BITMAPS::align_items_center ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::alignCenterX( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::alignCenterX( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.alignCenterX" )
|
.Name( "pcbnew.AlignAndDistribute.alignCenterX" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Align to Horizontal Center" ) )
|
.FriendlyName( _( "Align to Horizontal Center" ) )
|
||||||
.Tooltip( _( "Aligns selected items to the horizontal center" ) )
|
.Tooltip( _( "Aligns selected items to the horizontal center of the item under the cursor" ) )
|
||||||
.Icon( BITMAPS::align_items_middle ) );
|
.Icon( BITMAPS::align_items_middle ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::distributeHorizontally( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::distributeHorizontally( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.distributeHorizontally" )
|
.Name( "pcbnew.AlignAndDistribute.distributeHorizontally" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Distribute Horizontally" ) )
|
.FriendlyName( _( "Distribute Horizontally" ) )
|
||||||
.Tooltip( _( "Distributes selected items along the horizontal axis" ) )
|
.Tooltip( _( "Distributes selected items between the left-most item and the right-most item" ) )
|
||||||
.Icon( BITMAPS::distribute_horizontal ) );
|
.Icon( BITMAPS::distribute_horizontal ) );
|
||||||
|
|
||||||
TOOL_ACTION PCB_ACTIONS::distributeVertically( TOOL_ACTION_ARGS()
|
TOOL_ACTION PCB_ACTIONS::distributeVertically( TOOL_ACTION_ARGS()
|
||||||
.Name( "pcbnew.AlignAndDistribute.distributeVertically" )
|
.Name( "pcbnew.AlignAndDistribute.distributeVertically" )
|
||||||
.Scope( AS_GLOBAL )
|
.Scope( AS_GLOBAL )
|
||||||
.FriendlyName( _( "Distribute Vertically" ) )
|
.FriendlyName( _( "Distribute Vertically" ) )
|
||||||
.Tooltip( _( "Distributes selected items along the vertical axis" ) )
|
.Tooltip( _( "Distributes selected items between the top-most item and the bottom-most item" ) )
|
||||||
.Icon( BITMAPS::distribute_vertical ) );
|
.Icon( BITMAPS::distribute_vertical ) );
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue