eeschema: Allow labels to rotate on bus unfold

This commit is contained in:
Ian McInerney 2019-11-15 20:43:56 +00:00
parent 04edc6ceff
commit 1df7b718d9
1 changed files with 8 additions and 0 deletions

View File

@ -450,6 +450,10 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType,
Activate(); Activate();
// Add the new label to the selection so the rotate command operates on it
if( m_busUnfold.label )
m_selectionTool->AddItemToSel( m_busUnfold.label, true );
// Main loop: keep receiving events // Main loop: keep receiving events
while( TOOL_EVENT* evt = Wait() ) while( TOOL_EVENT* evt = Wait() )
{ {
@ -471,6 +475,9 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType,
if( m_busUnfold.entry ) if( m_busUnfold.entry )
m_frame->RemoveFromScreen( m_busUnfold.entry ); m_frame->RemoveFromScreen( m_busUnfold.entry );
if( m_busUnfold.label && !m_busUnfold.label_placed )
m_selectionTool->RemoveItemFromSel( m_busUnfold.label, true );
if( m_busUnfold.label && m_busUnfold.label_placed ) if( m_busUnfold.label && m_busUnfold.label_placed )
m_frame->RemoveFromScreen( m_busUnfold.label ); m_frame->RemoveFromScreen( m_busUnfold.label );
@ -533,6 +540,7 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType,
wxASSERT( aType == LAYER_WIRE ); wxASSERT( aType == LAYER_WIRE );
m_frame->AddToScreen( m_busUnfold.label ); m_frame->AddToScreen( m_busUnfold.label );
m_selectionTool->RemoveItemFromSel( m_busUnfold.label, true );
m_busUnfold.label_placed = true; m_busUnfold.label_placed = true;
} }