mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Respect non-free-pads mode for Move Exactly.
(Also makes sure the filters are always in the same order, though this may be immaterial.) Fixes https://gitlab.com/kicad/code/kicad/-/issues/21183
This commit is contained in:
parent
c960f69a9b
commit
edbe570d42
@ -2031,8 +2031,9 @@ int EDIT_TOOL::Rotate( const TOOL_EVENT& aEvent )
|
||||
PCB_SELECTION& selection = m_selectionTool->RequestSelection(
|
||||
[]( const VECTOR2I& aPt, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool )
|
||||
{
|
||||
sTool->FilterCollectorForHierarchy( aCollector, true );
|
||||
sTool->FilterCollectorForMarkers( aCollector );
|
||||
sTool->FilterCollectorForHierarchy( aCollector, true );
|
||||
sTool->FilterCollectorForFreePads( aCollector, false );
|
||||
sTool->FilterCollectorForTableCells( aCollector );
|
||||
},
|
||||
// Prompt user regarding locked items if in board editor and in free-pad-mode (if
|
||||
@ -2234,9 +2235,8 @@ int EDIT_TOOL::Mirror( const TOOL_EVENT& aEvent )
|
||||
updateModificationPoint( selection );
|
||||
VECTOR2I mirrorPoint = selection.GetReferencePoint();
|
||||
|
||||
FLIP_DIRECTION flipDirection = aEvent.IsAction( &PCB_ACTIONS::mirrorV )
|
||||
? FLIP_DIRECTION::TOP_BOTTOM
|
||||
: FLIP_DIRECTION::LEFT_RIGHT;
|
||||
FLIP_DIRECTION flipDirection = aEvent.IsAction( &PCB_ACTIONS::mirrorV ) ? FLIP_DIRECTION::TOP_BOTTOM
|
||||
: FLIP_DIRECTION::LEFT_RIGHT;
|
||||
|
||||
std::vector<EDA_ITEM*> items;
|
||||
|
||||
@ -2767,6 +2767,7 @@ int EDIT_TOOL::MoveExact( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
sTool->FilterCollectorForMarkers( aCollector );
|
||||
sTool->FilterCollectorForHierarchy( aCollector, true );
|
||||
sTool->FilterCollectorForFreePads( aCollector, false );
|
||||
sTool->FilterCollectorForTableCells( aCollector );
|
||||
},
|
||||
true /* prompt user regarding locked items */ );
|
||||
@ -2863,9 +2864,9 @@ int EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent )
|
||||
const PCB_SELECTION& selection = m_selectionTool->RequestSelection(
|
||||
[]( const VECTOR2I&, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool )
|
||||
{
|
||||
sTool->FilterCollectorForFreePads( aCollector, true );
|
||||
sTool->FilterCollectorForMarkers( aCollector );
|
||||
sTool->FilterCollectorForHierarchy( aCollector, true );
|
||||
sTool->FilterCollectorForFreePads( aCollector, true );
|
||||
sTool->FilterCollectorForTableCells( aCollector );
|
||||
} );
|
||||
|
||||
@ -3038,8 +3039,8 @@ int EDIT_TOOL::Increment( const TOOL_EVENT& aEvent )
|
||||
}
|
||||
};
|
||||
|
||||
PCB_SELECTION& selection = m_selectionTool->RequestSelection(
|
||||
incrementableFilter, true /* prompt user regarding locked items */ );
|
||||
PCB_SELECTION& selection = m_selectionTool->RequestSelection( incrementableFilter,
|
||||
true /* prompt user regarding locked items */ );
|
||||
|
||||
if( selection.Empty() )
|
||||
return 0;
|
||||
@ -3072,8 +3073,8 @@ int EDIT_TOOL::Increment( const TOOL_EVENT& aEvent )
|
||||
continue;
|
||||
|
||||
// Increment on the pad numbers
|
||||
std::optional<wxString> newNumber =
|
||||
incrementer.Increment( pad.GetNumber(), incParam.Delta, incParam.Index );
|
||||
std::optional<wxString> newNumber = incrementer.Increment( pad.GetNumber(), incParam.Delta,
|
||||
incParam.Index );
|
||||
|
||||
if( newNumber )
|
||||
{
|
||||
@ -3089,8 +3090,8 @@ int EDIT_TOOL::Increment( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
PCB_TEXT& text = static_cast<PCB_TEXT&>( *item );
|
||||
|
||||
std::optional<wxString> newText =
|
||||
incrementer.Increment( text.GetText(), incParam.Delta, incParam.Index );
|
||||
std::optional<wxString> newText = incrementer.Increment( text.GetText(), incParam.Delta,
|
||||
incParam.Index );
|
||||
|
||||
if( newText )
|
||||
{
|
||||
@ -3116,8 +3117,7 @@ int EDIT_TOOL::Increment( const TOOL_EVENT& aEvent )
|
||||
}
|
||||
|
||||
|
||||
void EDIT_TOOL::PadFilter( const VECTOR2I&, GENERAL_COLLECTOR& aCollector,
|
||||
PCB_SELECTION_TOOL* sTool )
|
||||
void EDIT_TOOL::PadFilter( const VECTOR2I&, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool )
|
||||
{
|
||||
for( int i = aCollector.GetCount() - 1; i >= 0; i-- )
|
||||
{
|
||||
@ -3127,8 +3127,7 @@ void EDIT_TOOL::PadFilter( const VECTOR2I&, GENERAL_COLLECTOR& aCollector,
|
||||
}
|
||||
|
||||
|
||||
void EDIT_TOOL::FootprintFilter( const VECTOR2I&, GENERAL_COLLECTOR& aCollector,
|
||||
PCB_SELECTION_TOOL* sTool )
|
||||
void EDIT_TOOL::FootprintFilter( const VECTOR2I&, GENERAL_COLLECTOR& aCollector, PCB_SELECTION_TOOL* sTool )
|
||||
{
|
||||
for( int i = aCollector.GetCount() - 1; i >= 0; i-- )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user