Rebuilding connectivity must be done after changes are committed.
It also needs to be done after undo and redo. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15028
This commit is contained in:
parent
237cc7eee1
commit
a901247cbd
|
@ -214,8 +214,6 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
|
||||||
std::vector<SCH_ITEM*> bulkRemovedItems;
|
std::vector<SCH_ITEM*> bulkRemovedItems;
|
||||||
std::vector<SCH_ITEM*> itemsChanged;
|
std::vector<SCH_ITEM*> itemsChanged;
|
||||||
|
|
||||||
frame->RecalculateConnections( this, NO_CLEANUP );
|
|
||||||
|
|
||||||
for( COMMIT_LINE& ent : m_changes )
|
for( COMMIT_LINE& ent : m_changes )
|
||||||
{
|
{
|
||||||
int changeType = ent.m_type & CHT_TYPE;
|
int changeType = ent.m_type & CHT_TYPE;
|
||||||
|
@ -321,6 +319,12 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( frame )
|
||||||
|
{
|
||||||
|
frame->RecalculateConnections( this, NO_CLEANUP );
|
||||||
|
frame->TestDanglingEnds();
|
||||||
|
}
|
||||||
|
|
||||||
if( schematic )
|
if( schematic )
|
||||||
{
|
{
|
||||||
if( bulkAddedItems.size() > 0 )
|
if( bulkAddedItems.size() > 0 )
|
||||||
|
@ -347,9 +351,6 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
|
||||||
if( selectedModified )
|
if( selectedModified )
|
||||||
m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified );
|
m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified );
|
||||||
|
|
||||||
if( frame )
|
|
||||||
frame->TestDanglingEnds();
|
|
||||||
|
|
||||||
if( !( aCommitFlags & SKIP_SET_DIRTY ) )
|
if( !( aCommitFlags & SKIP_SET_DIRTY ) )
|
||||||
{
|
{
|
||||||
if( frame )
|
if( frame )
|
||||||
|
|
|
@ -1215,6 +1215,7 @@ int SCH_EDITOR_CONTROL::Undo( const TOOL_EVENT& aEvent )
|
||||||
|
|
||||||
m_frame->PutDataInPreviousState( undo_list );
|
m_frame->PutDataInPreviousState( undo_list );
|
||||||
m_frame->SetSheetNumberAndCount();
|
m_frame->SetSheetNumberAndCount();
|
||||||
|
m_frame->RecalculateConnections( nullptr, NO_CLEANUP );
|
||||||
m_frame->TestDanglingEnds();
|
m_frame->TestDanglingEnds();
|
||||||
|
|
||||||
// Now push the old command to the RedoList
|
// Now push the old command to the RedoList
|
||||||
|
@ -1249,6 +1250,7 @@ int SCH_EDITOR_CONTROL::Redo( const TOOL_EVENT& aEvent )
|
||||||
m_frame->PushCommandToUndoList( list );
|
m_frame->PushCommandToUndoList( list );
|
||||||
|
|
||||||
m_frame->SetSheetNumberAndCount();
|
m_frame->SetSheetNumberAndCount();
|
||||||
|
m_frame->RecalculateConnections( nullptr, NO_CLEANUP );
|
||||||
m_frame->TestDanglingEnds();
|
m_frame->TestDanglingEnds();
|
||||||
|
|
||||||
m_toolMgr->GetTool<EE_SELECTION_TOOL>()->RebuildSelection();
|
m_toolMgr->GetTool<EE_SELECTION_TOOL>()->RebuildSelection();
|
||||||
|
|
Loading…
Reference in New Issue