Clear child flags for items whose undo/redo is managed by parent.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21111
This commit is contained in:
Jeff Young
2025-06-17 19:56:43 +01:00
parent b2025b7568
commit 2e9987e722
+10
View File
@@ -415,6 +415,16 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
// after edition (selected items must keep their selection flag).
const int selected_mask = ( SELECTED | STARTPOINT | ENDPOINT );
schItem->ClearFlags( EDA_ITEM_ALL_FLAGS - selected_mask );
if( schItem->Type() == SCH_SHEET_T || schItem->Type() == SCH_SYMBOL_T )
{
schItem->RunOnChildren(
[&]( SCH_ITEM* child )
{
child->ClearFlags( EDA_ITEM_ALL_FLAGS - selected_mask );
},
RECURSE_MODE::NO_RECURSE );
}
}
if( schematic )