eeschema: Prevent double-commit on duplicate/copy
When activating the move from a drag extension, we need to add additional components to the commit. This breaks for duplicate/copy when we have already added the correct components
This commit is contained in:
parent
5f4a6e33a0
commit
2f782ac7a4
|
@ -257,7 +257,9 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
|
|||
{
|
||||
if( item->IsNew() )
|
||||
{
|
||||
if( ( item->GetFlags() & SELECTEDNODE ) != 0 )
|
||||
// TODO(snh): Remove extra tooling check after moving to schematic_commit model
|
||||
if( ( item->GetFlags() & SELECTEDNODE ) != 0
|
||||
&& ( m_frame->GetToolId() == ID_SCH_DRAG ) )
|
||||
{
|
||||
// Item was added in getConnectedDragItems
|
||||
saveCopyInUndoList( (SCH_ITEM*) item, UR_NEW, appendUndo );
|
||||
|
|
Loading…
Reference in New Issue