Changed one of COMMIT::Stage() methods to COMMIT::Modified()
This commit is contained in:
parent
267f01fa69
commit
6481ff75c9
|
@ -3,6 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 CERN
|
* Copyright (C) 2016 CERN
|
||||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||||
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -77,7 +78,7 @@ COMMIT& COMMIT::Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
COMMIT& COMMIT::Stage( EDA_ITEM* aItem, EDA_ITEM* aCopy )
|
COMMIT& COMMIT::Modified( EDA_ITEM* aItem, EDA_ITEM* aCopy )
|
||||||
{
|
{
|
||||||
EDA_ITEM* parent = parentObject( aItem );
|
EDA_ITEM* parent = parentObject( aItem );
|
||||||
|
|
||||||
|
@ -120,7 +121,7 @@ COMMIT& COMMIT::Stage( const PICKED_ITEMS_LIST& aItems, UNDO_REDO_T aModFlag )
|
||||||
assert( change_type == UR_CHANGED );
|
assert( change_type == UR_CHANGED );
|
||||||
|
|
||||||
// There was already a copy created, so use it
|
// There was already a copy created, so use it
|
||||||
Stage( item, copy );
|
Modified( item, copy );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
*
|
*
|
||||||
* Copyright (C) 2016 CERN
|
* Copyright (C) 2016 CERN
|
||||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||||
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
|
@ -104,12 +105,13 @@ public:
|
||||||
return Stage( aItem, CHT_MODIFY );
|
return Stage( aItem, CHT_MODIFY );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///> Creates an undo entry for an item that has been already modified. Requires a copy done
|
||||||
|
///> before the modification.
|
||||||
|
COMMIT& Modified( EDA_ITEM* aItem, EDA_ITEM* aCopy );
|
||||||
|
|
||||||
///> Adds a change of the item aItem of type aChangeType to the change list.
|
///> Adds a change of the item aItem of type aChangeType to the change list.
|
||||||
COMMIT& Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType );
|
COMMIT& Stage( EDA_ITEM* aItem, CHANGE_TYPE aChangeType );
|
||||||
|
|
||||||
///> Adds a change of an item with its copy done before the change has occurred.
|
|
||||||
COMMIT& Stage( EDA_ITEM* aItem, EDA_ITEM* aCopy );
|
|
||||||
|
|
||||||
COMMIT& Stage( std::vector<EDA_ITEM*>& container, CHANGE_TYPE aChangeType );
|
COMMIT& Stage( std::vector<EDA_ITEM*>& container, CHANGE_TYPE aChangeType );
|
||||||
|
|
||||||
COMMIT& Stage( const PICKED_ITEMS_LIST& aItems, UNDO_REDO_T aModFlag = UR_UNSPECIFIED );
|
COMMIT& Stage( const PICKED_ITEMS_LIST& aItems, UNDO_REDO_T aModFlag = UR_UNSPECIFIED );
|
||||||
|
|
Loading…
Reference in New Issue