Move TestDanglingEnds() to SCH_COMMIT.

Also fixes a bug where Convert Symbol wasn't undoable.

Also cleans up some SetModified() call no longer needed with SCH_COMMIT.

Also fixes bug where revert of a modification didn't update the screen's
RTree.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15030
This commit is contained in:
Jeff Young
2023-06-23 19:59:46 +01:00
parent f56ea370be
commit 237cc7eee1
9 changed files with 20 additions and 48 deletions
+8
View File
@@ -347,6 +347,9 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
if( selectedModified )
m_toolMgr->ProcessEvent( EVENTS::SelectedItemsModified );
if( frame )
frame->TestDanglingEnds();
if( !( aCommitFlags & SKIP_SET_DIRTY ) )
{
if( frame )
@@ -499,6 +502,8 @@ void SCH_COMMIT::Revert()
if( view )
view->Add( item );
screen->Update( item );
delete copy;
break;
}
@@ -525,7 +530,10 @@ void SCH_COMMIT::Revert()
selTool->RebuildSelection();
if( frame )
{
frame->RecalculateConnections( nullptr, NO_CLEANUP );
frame->TestDanglingEnds();
}
clear();
}