Fix undo issue primarily with libedit.
Fixes: lp:1797900 * https://bugs.launchpad.net/kicad/+bug/1797900
This commit is contained in:
parent
254e9f4a7e
commit
c22a247dbc
|
@ -148,18 +148,21 @@ void BLOCK_SELECTOR::InitData( EDA_DRAW_PANEL* aPanel, const wxPoint& startpos )
|
|||
void BLOCK_SELECTOR::ClearItemsList()
|
||||
{
|
||||
m_items.ClearItemsList();
|
||||
m_appendUndo = false;
|
||||
}
|
||||
|
||||
|
||||
void BLOCK_SELECTOR::ClearListAndDeleteItems()
|
||||
{
|
||||
m_items.ClearListAndDeleteItems();
|
||||
m_appendUndo = false;
|
||||
}
|
||||
|
||||
|
||||
void BLOCK_SELECTOR::PushItem( ITEM_PICKER& aItem )
|
||||
{
|
||||
m_items.PushItem( aItem );
|
||||
m_appendUndo = false;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -440,30 +440,28 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC )
|
|||
case BLOCK_DRAG_ITEM:
|
||||
case BLOCK_MOVE: // Move
|
||||
case BLOCK_DUPLICATE: // Duplicate
|
||||
block->ClearItemsList();
|
||||
|
||||
if( GetCurPart() && !block->AppendUndo() )
|
||||
SaveCopyInUndoList( GetCurPart() );
|
||||
|
||||
pt = block->GetMoveVector();
|
||||
//pt.y *= -1;
|
||||
|
||||
if( GetCurPart() )
|
||||
BlockMoveSelectedItems( pt, GetCurPart(), block );
|
||||
|
||||
block->ClearItemsList();
|
||||
m_canvas->Refresh( true );
|
||||
break;
|
||||
|
||||
case BLOCK_PASTE: // Paste (recopy the last block saved)
|
||||
block->ClearItemsList();
|
||||
|
||||
if( GetCurPart() )
|
||||
SaveCopyInUndoList( GetCurPart() );
|
||||
|
||||
pt = block->GetMoveVector();
|
||||
//pt.y = -pt.y;
|
||||
|
||||
pasteClipboard( pt );
|
||||
|
||||
block->ClearItemsList();
|
||||
m_canvas->Refresh( true );
|
||||
break;
|
||||
|
||||
case BLOCK_ZOOM: // Handled by HandleBlockEnd
|
||||
|
|
Loading…
Reference in New Issue