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