Make sure the IS_MOVED flag gets set when breaking out of a bus.

This (among other things) causes an update-preview event to be sent
when modifying it (such as rotating).

Fixes: lp:1854456
* https://bugs.launchpad.net/kicad/+bug/1854456
This commit is contained in:
Jeff Young 2019-12-02 13:30:22 +00:00
parent 5cd7f3fdee
commit 3af3bf894c
1 changed files with 3 additions and 1 deletions

View File

@ -337,6 +337,7 @@ SCH_LINE* SCH_LINE_WIRE_BUS_TOOL::doUnfoldBus( const wxString& aNet )
m_busUnfold.label->SetTextSize( wxSize( GetDefaultTextSize(), GetDefaultTextSize() ) );
m_busUnfold.label->SetLabelSpinStyle( 0 );
m_busUnfold.label->SetParent( m_frame->GetScreen() );
m_busUnfold.label->SetFlags( IS_NEW | IS_MOVED );
m_busUnfold.in_progress = true;
m_busUnfold.origin = pos;
@ -585,7 +586,7 @@ int SCH_LINE_WIRE_BUS_TOOL::doDrawSegments( const std::string& aTool, int aType,
//------------------------------------------------------------------------
// Handle motion:
//
else if( evt->IsMotion() )
else if( evt->IsMotion() || evt->IsAction( &ACTIONS::refreshPreview ) )
{
m_view->ClearPreview();
@ -806,6 +807,7 @@ void SCH_LINE_WIRE_BUS_TOOL::finishSegments()
itemList.PushItem( ITEM_PICKER( m_busUnfold.entry, UR_NEW ) );
itemList.PushItem( ITEM_PICKER( m_busUnfold.label, UR_NEW ) );
m_busUnfold.label->ClearEditFlags();
}
// Get the last non-null wire (this is the last created segment).