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
This commit is contained in:
parent
2d5752f51d
commit
786ee0ec69
|
@ -853,7 +853,7 @@ void SCH_EDIT_FRAME::OnRotate( wxCommandEvent& aEvent )
|
||||||
// Compute the rotation center and put it on grid:
|
// Compute the rotation center and put it on grid:
|
||||||
wxPoint rotationPoint = GetNearestGridPosition( block.Centre() );
|
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 );
|
SaveCopyInUndoList( block.GetItems(), UR_ROTATED, block.AppendUndo(), rotationPoint );
|
||||||
block.SetAppendUndo();
|
block.SetAppendUndo();
|
||||||
|
@ -1214,7 +1214,7 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
mirrorPt = GetNearestGridPosition( mirrorPt );
|
mirrorPt = GetNearestGridPosition( mirrorPt );
|
||||||
SetCrossHairPosition( 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 );
|
SaveCopyInUndoList( block.GetItems(), UR_MIRRORED_X, block.AppendUndo(), mirrorPt );
|
||||||
block.SetAppendUndo();
|
block.SetAppendUndo();
|
||||||
|
@ -1232,7 +1232,7 @@ void SCH_EDIT_FRAME::OnOrient( wxCommandEvent& aEvent )
|
||||||
mirrorPt = GetNearestGridPosition( mirrorPt );
|
mirrorPt = GetNearestGridPosition( mirrorPt );
|
||||||
SetCrossHairPosition( 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 );
|
SaveCopyInUndoList( block.GetItems(), UR_MIRRORED_Y, block.AppendUndo(), mirrorPt );
|
||||||
block.SetAppendUndo();
|
block.SetAppendUndo();
|
||||||
|
|
Loading…
Reference in New Issue