commit/groups: add ability to modify membership of group

Also add warning when you've tried to modify two groups in one commit,
which isn't currently supported.
This commit is contained in:
Mike Williams
2025-05-14 12:15:22 -04:00
parent eff4cdd6b4
commit 195e79ae46
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -283,7 +283,10 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
}
if( schItem->Type() == SCH_GROUP_T )
{
wxASSERT_MSG( !addedGroup, "Multiple groups in a single commit. This is not supported." );
addedGroup = static_cast<SCH_GROUP*>( schItem );
}
if( frame )
frame->UpdateItem( schItem, true, true );
@@ -374,6 +377,12 @@ void SCH_COMMIT::pushSchEdit( const wxString& aMessage, int aCommitFlags )
ent.m_copy = nullptr; // We've transferred ownership to the undo list
}
if( schItem->Type() == SCH_GROUP_T )
{
wxASSERT_MSG( !addedGroup, "Multiple groups in a single commit. This is not supported." );
addedGroup = static_cast<SCH_GROUP*>( schItem );
}
if( frame )
frame->UpdateItem( schItem, false, true );