mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
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:
parent
eff4cdd6b4
commit
195e79ae46
@ -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 );
|
||||
|
||||
|
@ -320,7 +320,10 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
||||
}
|
||||
|
||||
if( boardItem->Type() == PCB_GROUP_T || boardItem->Type() == PCB_GENERATOR_T )
|
||||
{
|
||||
wxASSERT_MSG( !addedGroup, "Multiple groups in a single commit. This is not supported." );
|
||||
addedGroup = static_cast<PCB_GROUP*>( boardItem );
|
||||
}
|
||||
|
||||
if( boardItem->Type() != PCB_MARKER_T )
|
||||
propagateDamage( boardItem, staleZones );
|
||||
@ -467,6 +470,12 @@ void BOARD_COMMIT::Push( const wxString& aMessage, int aCommitFlags )
|
||||
connectivity->Update( boardItem );
|
||||
}
|
||||
|
||||
if( boardItem->Type() == PCB_GROUP_T || boardItem->Type() == PCB_GENERATOR_T )
|
||||
{
|
||||
wxASSERT_MSG( !addedGroup, "Multiple groups in a single commit. This is not supported." );
|
||||
addedGroup = static_cast<PCB_GROUP*>( boardItem );
|
||||
}
|
||||
|
||||
if( boardItem->Type() != PCB_MARKER_T )
|
||||
{
|
||||
propagateDamage( boardItemCopy, staleZones ); // before
|
||||
|
Loading…
x
Reference in New Issue
Block a user