Eeschema: when placing a symbol, and after placing others instances of the symbol
deselect the previously placed items. Otherwise, the changes (rotation, mirroring...) made during placing the current symbol are applied to other previously placed items. This is obviously not what is wanted, and creates crashes in Eeschema. Fixes #4163 https://gitlab.com/kicad/code/kicad/issues/4163
This commit is contained in:
parent
710e93bc53
commit
1027c2fb8d
|
@ -210,6 +210,11 @@ int SCH_DRAWING_TOOLS::PlaceComponent( const TOOL_EVENT& aEvent )
|
||||||
// We are either stepping to the next unit or next component
|
// We are either stepping to the next unit or next component
|
||||||
if( m_frame->GetRepeatComponent() || new_unit > 1 )
|
if( m_frame->GetRepeatComponent() || new_unit > 1 )
|
||||||
{
|
{
|
||||||
|
// Deselect the last placed symbol: obviously we do not want to
|
||||||
|
// apply some changes (like rotation, mirror...) to previously placed
|
||||||
|
// symbols.
|
||||||
|
m_selectionTool->ClearSelection();
|
||||||
|
|
||||||
next_comp = static_cast<SCH_COMPONENT*>( component->Duplicate() );
|
next_comp = static_cast<SCH_COMPONENT*>( component->Duplicate() );
|
||||||
next_comp->SetFlags( IS_NEW | IS_MOVED );
|
next_comp->SetFlags( IS_NEW | IS_MOVED );
|
||||||
next_comp->SetUnit( new_unit );
|
next_comp->SetUnit( new_unit );
|
||||||
|
|
Loading…
Reference in New Issue