Convert pasted objects to current unit and DeMorgan variant.

Fixes: lp:1797183
* https://bugs.launchpad.net/kicad/+bug/1797183
This commit is contained in:
Jeff Young 2018-11-08 20:44:04 +00:00
parent 5c726744b6
commit 3de04e184b
1 changed files with 13 additions and 1 deletions

View File

@ -496,7 +496,19 @@ void LIB_EDIT_FRAME::InitBlockPasteInfos()
// (only the copy, the new instances will be appended to the part once the items are placed) // (only the copy, the new instances will be appended to the part once the items are placed)
block.GetItems().CopyList( m_clipboard.GetItems() ); block.GetItems().CopyList( m_clipboard.GetItems() );
// Set the pate reference point // Set block items to the current unit & DeMorgan variant
for( size_t i = 0; i < m_clipboard.GetItems().GetCount(); ++i )
{
LIB_ITEM* item = dynamic_cast<LIB_ITEM*>( m_clipboard.GetItem( i ) );
if( item )
{
item->SetUnit( m_unit );
item->SetConvert( m_convert );
}
}
// Set the paste reference point
block.SetLastCursorPosition( m_clipboard.GetLastCursorPosition() ); block.SetLastCursorPosition( m_clipboard.GetLastCursorPosition() );
m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines ); m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines );
} }