Commit Graph

20 Commits

Author SHA1 Message Date
luz.paz
019f73852c src/App: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/App` files
2019-12-25 11:38:43 +01:00
Zheng, Lei
f6ad70195f App: fix dynamic property undo/redo
Instead of enforce property type match when undo/redo, modify various
property Paste() to make it type safe.
2019-10-07 17:24:31 +02:00
wmayer
9fa56345cf core system
force strict ISO C++ (-Wpedantic)
TODO: still a lot of variadic macros are not valid ISO C++
2019-09-18 01:01:14 +02:00
Zheng, Lei
d7dd720eaf App: fix property type matching in transaction 2019-08-17 15:32:50 +02:00
Zheng, Lei
de4651bc99 App: transaction related API changes
Introduce a new concept of transaction ID. Each transaction must be
unique inside the document. Multiple transactions from different
documents can be grouped together with the same transaction ID.
This makes it possible to undo/redo single operation that contains
changes from multiple documents due to external linking.

Application:

* get/set/closeActiveTransaction() is used to setup potential
  transactions with a given name. The transaction is only created when
  there is actual changes. If objects from multiple documents are
  changed under the same active transaction, they will have the same
  trasnaction ID, and can be undo/redo togtether later.

* signalUndo/signalRedo, new signals triggered once after an undo/redo
  operation. Unlike signalUndo/RedoDocument, these signals will only be
  triggered once even if there may be multiple documents involved during
  undo/redo.

* signal(Before)CloseTransaction, new signals triggered before/after an
  actual transaction is created or aborted.

AutoTransaction:

* Helper class to enable automatic management of transactions. See class
  document for more details. This class will be used by Gui::Command
  in later patches to allow better automation of transactions in
  command.

Document:

* open/commit/abortTransaction() are now redirected to call
  Application::get/set/closeActiveTransaction() instead.

* _openTransaction() is added to do the real creation of transaction.

* _checkTransaction() is modified to create transaction on actual change
  of any property.

* getTransactionID() is used to find out the position of a transaction
  with a given ID. When triggering undo in external document, it may be
  necessary to perform multi-step undo/redo in order to match for the
  transaction ID.

Transaction/TransactionObject:

* Various changes for the new transaction ID concept.

* Support undo/redo add/remove dynamic property
2019-08-17 14:52:09 +02:00
wmayer
06fa64a00d add method to check if an open transaction is empty
This is needed to avoid to incorrectly abort a transaction if a recompute was done between opening and closing an editor in the property view
2018-11-10 14:50:58 +01:00
wmayer
9c86a3918f put USE_OLD_DAG around use of backlinks 2018-10-22 12:06:22 +02:00
wmayer
5e16cb9792 fixes #0003323: Crash when clearing transaction list 2018-01-31 23:39:13 +01:00
Unknown
e3eca59173 Misc. typo fixes
Various workbenches
2017-12-23 14:30:30 +01:00
wmayer
712966ff50 rename method from remObject to removeObject to be more readable 2017-09-13 18:57:38 +02:00
wmayer
3a0c3499e5 improve whitespaces 2017-09-09 18:07:46 +02:00
Stefan Tröger
b2874ec0dc Keep backlink consitent during undo/redo. issue 0003150 2017-09-09 16:55:55 +02:00
wmayer
a5bf15b55d remove properties from transactions when being deleted 2017-08-28 21:20:17 +02:00
wmayer
c636974ec8 fix -Wextra in FreeCADApp 2016-09-21 16:05:36 +02:00
wmayer
ac32ab0b00 + fix order of removed objects in transaction list
+ add assert to check for obvious error
+ removed unneeded method
2016-07-23 11:47:01 +02:00
wmayer
71390dcf20 prepare view provider for undo/redo 2016-07-23 11:46:19 +02:00
wmayer
3d16ae0f04 prepare view provider for undo/redo 2016-07-23 11:45:21 +02:00
wmayer
ff56a3b53d + better check for opening a transaction when removing an object from document 2013-08-15 16:47:56 +02:00
wmayer
50a0e00960 Fix build error on MacOSX 2013-02-25 11:57:11 +01:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00