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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user