mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
pcb design blocks: cleanup unused parameter
The position would always be "don't move at all" since we need to ensure the design block fits in the canvas area, which means we can't move any objects that we import.
This commit is contained in:
parent
2abeb5cb49
commit
ef50c31584
@ -462,7 +462,7 @@ TOOL_ACTION PCB_ACTIONS::placeLinkedDesignBlock( TOOL_ACTION_ARGS()
|
||||
.Tooltip( _( "Place design block linked to selected group" ) )
|
||||
.Icon( BITMAPS::add_component )
|
||||
.Flags( AF_ACTIVATE )
|
||||
.Parameter<VECTOR2I*>( nullptr ) );
|
||||
.Parameter<bool*>( nullptr ) );
|
||||
|
||||
TOOL_ACTION PCB_ACTIONS::applyDesignBlockLayout( TOOL_ACTION_ARGS()
|
||||
.Name( "pcbnew.InteractiveDrawing.applyDesignBlockLayout" )
|
||||
|
@ -1414,10 +1414,10 @@ int PCB_CONTROL::ApplyDesignBlockLayout( const TOOL_EVENT& aEvent )
|
||||
|
||||
int ret = 1;
|
||||
|
||||
VECTOR2I placementPos( 0, 0 );
|
||||
bool skipMove = true;
|
||||
|
||||
// If we succeeded in placing the linked design block, we're ready to apply the multichannel tool
|
||||
if( m_toolMgr->RunSynchronousAction( PCB_ACTIONS::placeLinkedDesignBlock, &tempCommit, &placementPos ) )
|
||||
if( m_toolMgr->RunSynchronousAction( PCB_ACTIONS::placeLinkedDesignBlock, &tempCommit, &skipMove ) )
|
||||
{
|
||||
// Lambda for the bounding box of all the components
|
||||
auto generateBoundingBox = [&]( std::unordered_set<EDA_ITEM*> aItems )
|
||||
@ -1593,9 +1593,9 @@ int PCB_CONTROL::PlaceLinkedDesignBlock( const TOOL_EVENT& aEvent )
|
||||
if( !pi )
|
||||
return 1;
|
||||
|
||||
if( aEvent.Parameter<VECTOR2I*>() != nullptr )
|
||||
if( aEvent.Parameter<bool*>() != nullptr )
|
||||
return AppendBoard( *pi, designBlock->GetBoardFile(), nullptr, static_cast<BOARD_COMMIT*>( aEvent.Commit() ),
|
||||
true, *aEvent.Parameter<VECTOR2I*>() );
|
||||
*aEvent.Parameter<bool*>() );
|
||||
else
|
||||
return AppendBoard( *pi, designBlock->GetBoardFile() );
|
||||
}
|
||||
@ -1817,7 +1817,7 @@ bool PCB_CONTROL::placeBoardItems( BOARD_COMMIT* aCommit, std::vector<BOARD_ITEM
|
||||
|
||||
|
||||
int PCB_CONTROL::AppendBoard( PCB_IO& pi, const wxString& fileName, DESIGN_BLOCK* aDesignBlock, BOARD_COMMIT* aCommit,
|
||||
bool aHasPosition, VECTOR2I aPosition )
|
||||
bool aSkipMove )
|
||||
{
|
||||
PCB_EDIT_FRAME* editFrame = dynamic_cast<PCB_EDIT_FRAME*>( m_frame );
|
||||
|
||||
@ -1940,7 +1940,7 @@ int PCB_CONTROL::AppendBoard( PCB_IO& pi, const wxString& fileName, DESIGN_BLOCK
|
||||
if( APP_SETTINGS_BASE* cfg = editFrame->config() )
|
||||
placeAsGroup = cfg->m_DesignBlockChooserPanel.place_as_group;
|
||||
|
||||
if( placeBoardItems( commit, brd, false, false /* Don't reannotate dupes on Append Board */, aHasPosition ) )
|
||||
if( placeBoardItems( commit, brd, false, false /* Don't reannotate dupes on Append Board */, aSkipMove ) )
|
||||
{
|
||||
if( placeAsGroup )
|
||||
{
|
||||
|
@ -111,8 +111,7 @@ public:
|
||||
int PlaceLinkedDesignBlock( const TOOL_EVENT& aEvent );
|
||||
int SaveToLinkedDesignBlock( const TOOL_EVENT& aEvent );
|
||||
int AppendBoard( PCB_IO& pi, const wxString& fileName, DESIGN_BLOCK* aDesignBlock = nullptr,
|
||||
BOARD_COMMIT* aCommit = nullptr, bool aHasPosition = false,
|
||||
VECTOR2I aPosition = VECTOR2I( 0, 0 ) );
|
||||
BOARD_COMMIT* aCommit = nullptr, bool aSkipMove = false );
|
||||
int UpdateMessagePanel( const TOOL_EVENT& aEvent );
|
||||
int PlaceCharacteristics( const TOOL_EVENT& aEvent );
|
||||
int PlaceStackup( const TOOL_EVENT& aEvent );
|
||||
|
Loading…
x
Reference in New Issue
Block a user