From 786ee0ec6955b458e7129085526a81c003179e16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Thu, 17 Jan 2019 00:46:47 +0100 Subject: [PATCH] eeschema: fix assertion fail when aborting a paste block operation after the pasted block has been rotated Fixes: lp:1812073 * https://bugs.launchpad.net/kicad/+bug/1812073 --- eeschema/schedit.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 0662a3c9fe..90a186d60f 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -853,7 +853,7 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent ) // Compute the rotation center and put it on grid: wxPoint rotationPoint = GetNearestGridPosition( block.Centre() ); - if( block.GetCommand() != BLOCK_DUPLICATE ) + if( block.GetCommand() != BLOCK_DUPLICATE && block.GetCommand() != BLOCK_PASTE ) { SaveCopyInUndoList( block.GetItems(), UR_ROTATED, block.AppendUndo(), rotationPoint ); block.SetAppendUndo(); @@ -1214,7 +1214,7 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent ) mirrorPt = GetNearestGridPosition( mirrorPt ); SetCrossHairPosition( mirrorPt ); - if( block.GetCommand() != BLOCK_DUPLICATE ) + if( block.GetCommand() != BLOCK_DUPLICATE && block.GetCommand() != BLOCK_PASTE ) { SaveCopyInUndoList( block.GetItems(), UR_MIRRORED_X, block.AppendUndo(), mirrorPt ); block.SetAppendUndo(); @@ -1232,7 +1232,7 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent ) mirrorPt = GetNearestGridPosition( mirrorPt ); SetCrossHairPosition( mirrorPt ); - if( block.GetCommand() != BLOCK_DUPLICATE ) + if( block.GetCommand() != BLOCK_DUPLICATE && block.GetCommand() != BLOCK_PASTE ) { SaveCopyInUndoList( block.GetItems(), UR_MIRRORED_Y, block.AppendUndo(), mirrorPt ); block.SetAppendUndo();