Copy shape data when converting PCB TEXTBOX to FP.
Fixes https://gitlab.com/kicad/code/kicad/issues/12298
This commit is contained in:
parent
77c79b6f6a
commit
b886ec728e
|
@ -787,6 +787,12 @@ int PCB_CONTROL::Paste( const TOOL_EVENT& aEvent )
|
|||
|
||||
// Convert to PCB_FP_TEXTBOX_T
|
||||
FP_TEXTBOX* pastedTextBox = new FP_TEXTBOX( editorFootprint );
|
||||
|
||||
// Handle shape data
|
||||
static_cast<PCB_SHAPE*>( pastedTextBox )->SwapData( clipTextBox );
|
||||
pastedTextBox->SetLocalCoord();
|
||||
|
||||
// Handle text data
|
||||
static_cast<EDA_TEXT*>( pastedTextBox )->SwapText( *clipTextBox );
|
||||
static_cast<EDA_TEXT*>( pastedTextBox )->SwapAttributes( *clipTextBox );
|
||||
|
||||
|
|
Loading…
Reference in New Issue