Schematic: label auto orientation needs to respect move/drag/change
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13226
This commit is contained in:
parent
0c415a7190
commit
e65de51fc7
|
@ -548,11 +548,16 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataFromWindow()
|
||||||
selectedSpinStyle = TEXT_SPIN_STYLE::BOTTOM;
|
selectedSpinStyle = TEXT_SPIN_STYLE::BOTTOM;
|
||||||
|
|
||||||
if( m_currentLabel->AutoRotateOnPlacementSupported() )
|
if( m_currentLabel->AutoRotateOnPlacementSupported() )
|
||||||
|
{
|
||||||
|
SCH_EDIT_FRAME* frame = static_cast<SCH_EDIT_FRAME*>( m_parentFrame );
|
||||||
m_currentLabel->SetAutoRotateOnPlacement( m_autoRotate->IsChecked() );
|
m_currentLabel->SetAutoRotateOnPlacement( m_autoRotate->IsChecked() );
|
||||||
|
frame->AutoRotateItem( frame->GetScreen(), m_currentLabel );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
m_currentLabel->SetAutoRotateOnPlacement( false );
|
m_currentLabel->SetAutoRotateOnPlacement( false );
|
||||||
|
|
||||||
if( m_currentLabel->GetTextSpinStyle() != selectedSpinStyle )
|
if( !m_currentLabel->AutoRotateOnPlacement()
|
||||||
|
&& m_currentLabel->GetTextSpinStyle() != selectedSpinStyle )
|
||||||
m_currentLabel->SetTextSpinStyle( selectedSpinStyle );
|
m_currentLabel->SetTextSpinStyle( selectedSpinStyle );
|
||||||
|
|
||||||
if( doAutoplace )
|
if( doAutoplace )
|
||||||
|
|
|
@ -931,6 +931,10 @@ int SCH_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
|
||||||
if( m_isDrag && !isSlice )
|
if( m_isDrag && !isSlice )
|
||||||
trimDanglingLines();
|
trimDanglingLines();
|
||||||
|
|
||||||
|
// Auto-rotate any moved labels
|
||||||
|
for( EDA_ITEM* item : selection )
|
||||||
|
m_frame->AutoRotateItem( m_frame->GetScreen(), static_cast<SCH_ITEM*>( item ) );
|
||||||
|
|
||||||
m_frame->RecalculateConnections( LOCAL_CLEANUP );
|
m_frame->RecalculateConnections( LOCAL_CLEANUP );
|
||||||
m_frame->OnModify();
|
m_frame->OnModify();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue