Add new text items/labels to the selection so rotate/mirror/etc. work.

Also clears the selection after finding the sheet in the sheet pin
case so that the sheet itself doesn't get rotated/mirrored/etc.

Fixes https://gitlab.com/kicad/code/kicad/issues/8108
This commit is contained in:
Jeff Young 2021-04-03 19:39:56 +01:00
parent 83ae28f04f
commit 329577cc5c
1 changed files with 4 additions and 0 deletions

View File

@ -1051,6 +1051,8 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
if( m_selectionTool->SelectPoint( cursorPos, EE_COLLECTOR::SheetsOnly, &i ) )
sheet = dynamic_cast<SCH_SHEET*>( i );
m_selectionTool->ClearSelection();
if( !sheet )
{
m_statusPopup.reset( new STATUS_TEXT_POPUP( m_frame ) );
@ -1087,6 +1089,8 @@ int SCH_DRAWING_TOOLS::TwoClickPlace( const TOOL_EVENT& aEvent )
item->AutoplaceFields( /* aScreen */ nullptr, /* aManual */ false );
updatePreview();
m_selectionTool->AddItemToSel( item );
// update the cursor so it looks correct before another event
setCursor();
}