summaryrefslogtreecommitdiffstats
path: root/core/undo_redo.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add static_assert checks where code assumes VARIANT_ARG_MAX == 5Timo Schwarzer2020-05-251-0/+2
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-141-22/+44
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+4
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-42/+0
| | | | | | | | | | | | | | Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
* Port member initialization from constructor to declaration (C++11)Rémi Verschelde2020-05-141-17/+0
| | | | | | | | | | Using `clang-tidy`'s `modernize-use-default-member-init` check and manual review of the changes, and some extra manual changes that `clang-tidy` failed to do. Also went manually through all of `core` to find occurrences that `clang-tidy` couldn't handle, especially all initializations done in a constructor without using initializer lists.
* Replace is_commiting_action with is_committing_actionlupoDharkael2020-04-081-2/+1
|
* Replace NULL with nullptrlupoDharkael2020-04-021-12/+12
|
* Added StringName as a variant type.Juan Linietsky2020-02-211-12/+12
| | | | Also changed all relevant properties defined manually to StringName.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-12/+12
| | | | objects and made them default.
* Remove duplicate ERR_PRINT macro.Marcel Admiraal2020-02-051-1/+1
|
* Allows to doc vararg method return type as voidHaoyu Qiu2020-01-021-2/+2
|
* Update copyright statements to 2020Rémi Verschelde2020-01-011-2/+2
| | | | | | | | | | | Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
* UndoRedo add version changed signalAlexander Holland2019-06-261-2/+21
| | | added some functions to manage undo buttons
* Fix typos with codespellRémi Verschelde2019-05-191-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using codespell 1.15.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear doubleclick leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
* Fix 'UndoRedo' increasing its version on actions that should be mergedMichael Alexsander Silva Dias2019-04-041-1/+7
|
* Safer way to update animation if changed, fixes #26670Juan Linietsky2019-03-061-5/+2
|
* Implement a more coherent (and way less hack) way to block animation ↵Juan Linietsky2019-03-031-1/+11
| | | | updates, fixes #24618
* Revert "Fix 'UndoRedo's 'MERGE_ALL' mode repeating instructions when quickly ↵Michael Alexsander Silva Dias2019-02-251-13/+19
| | | | | | commiting actions" This reverts commit 79f1d8b4fbac564cb55669bbf05034bb9e15ae4a.
* Fix 'UndoRedo's 'MERGE_ALL' mode repeating instructions when quickly ↵Michael Alexsander Silva Dias2019-02-211-19/+13
| | | | | | | | commiting actions It seems that the merge operation validation is only useful to the 'MERGE_ENDS' mode, causing problems when in 'MERGE_ALL'. Fixes #26118.
* -Fixes to undo redo to avoid crash, closes #24251Juan Linietsky2019-02-141-6/+5
| | | | | | | | | -Changed Animation to have a special signal when tracks are changed, to avoid unnecesary track cache rebuilds in AnimationPlayer -Added missing emit_changed whe modifying keys to Animation -Changed AnimationPlayer to use the new refcounted connections instead of the previous hacky way to keep references -Changed AnimationEditor to update the current track when keys are edited -Fixed bug where undo/redo did not work with AnimationKeyEdit (was not being updated) -Made sure UndoRedo does not mind deleted objects in undo/redo history, this would corrupt the history or clear it without need.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Merge pull request #21856 from AlexHolly/fix-undo-not-showing-errorRémi Verschelde2018-12-141-1/+18
|\ | | | | Fix undo redo not showing errors
| * Fix undo redo not showing errorsAlexander Holland2018-09-081-1/+18
| |
* | Add argument to UndoRedo's "clear_history()" to not increase the versionMichael Alexsander Silva Dias2018-11-181-3/+4
| |
* | Clearing history increments version, else it does not generate an asterisk ↵Juan Linietsky2018-11-161-1/+1
| | | | | | | | | | | | | | on modification if the scene was just saved. Fixes #18027. Still I feel this line was commented for a reason. If you bisect a bug and find this commit, let me know.
* | Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+1
|/ | | | | | This allows more consistency in the manner we include core headers, where previously there would be a mix of absolute, relative and include path-dependent includes.
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-13/+13
| | | | | | | | | | | | | | | | | | | | | | | This commit makes operator[] on Vector const and adds a write proxy to it. From now on writes to Vectors need to happen through the .write proxy. So for instance: Vector<int> vec; vec.push_back(10); std::cout << vec[0] << std::endl; vec.write[0] = 20; Failing to use the .write proxy will cause a compilation error. In addition COWable datatypes can now embed a CowData pointer to their data. This means that String, CharString, and VMap no longer use or derive from Vector. _ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug builds. This is a lot faster for Vector in the editor and while running tests. The reason why this difference used to exist is because force-inlined methods used to give a bad debugging experience. After extensive testing with modern compilers this is no longer the case.
* Add a message when there is nothing to Undo or RedoMarcelo Fernandez2018-05-271-6/+10
|
* obsolete UndoRedo max_steps; no users identifiedTodd Ross2018-01-081-20/+0
|
* Add null checking for paramaters in Undoredogeequlim2018-01-071-0/+6
|
* Add missing copyright headers and fix formattingRémi Verschelde2018-01-051-0/+1
| | | | | | Using `misc/scripts/fix_headers.py` on all Godot files. Some missing header guards were added, and the header inclusion order was fixed in the Bullet module.
* Update copyright statements to 2018Rémi Verschelde2018-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Expose more methods for UndoRedoGeequlim2017-09-131-0/+4
|
* Use HTTPS URL for Godot's website in the headersRémi Verschelde2017-08-271-1/+1
|
* Convert Object::cast_to() to the static versionHein-Pieter van Braam2017-08-241-14/+14
| | | | | | | | | | | | Currently we rely on some undefined behavior when Object->cast_to() gets called with a Null pointer. This used to work fine with GCC < 6 but newer versions of GCC remove all codepaths in which the this pointer is Null. However, the non-static cast_to() was supposed to be null safe. This patch makes cast_to() Null safe and removes the now redundant Null checks where they existed. It is explained in this article: https://www.viva64.com/en/b/0226/
* ClassDB: Provide the enum name of integer constantsIgnacio Etcheverry2017-08-201-3/+3
|
* Removes type information from method bindsIgnacio Etcheverry2017-08-101-2/+2
|
* Makes all Godot API's methods Lower CaseIndah Sylvia2017-08-071-6/+6
|
* Add "Godot Engine contributors" copyright lineRémi Verschelde2017-04-081-0/+1
|
* A Whole New World (clang-format edition)Rémi Verschelde2017-03-051-187/+171
| | | | | | | | | | | | | | | | | | | | | | | | I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
* Rename the _MD macro to D_METHODHein-Pieter van Braam2017-02-131-11/+11
| | | | | | This new name also makes its purpose a little clearer This is a step towards fixing #56
* Ability to drag and drop around audio effects!Juan Linietsky2017-01-241-2/+0
|
* Ability to delete, drag and drop audio buses!Juan Linietsky2017-01-231-0/+2
|
* Style: Cleanups, added headers, renamed filesRémi Verschelde2017-01-161-0/+1
| | | | | | | | | Made sure files in core/ and tools/ have a proper Godot license header when written by us. Also renamed aabb.{cpp,h} and object_type_db.{cpp,h} to rect3.{cpp,h} and class_db.{cpp,h} respectively. Also added a proper header to core/io/base64.{c,h} after clarifying the licensing with the original author (public domain).
* -Changed most project settings in the engine, so they have major and minor ↵Juan Linietsky2017-01-051-2/+7
| | | | | | | | categories. -Changed SectionedPropertyEditor to support this -Renamed Globals singleton to GlobalConfig, makes more sense. -Changed the logic behind persisten global settings, instead of the persist checkbox, a revert button is now available
* ObjectTypeDB was renamed to ClassDB. Types are meant to be more generic to ↵Juan Linietsky2017-01-021-13/+13
| | | | | | | | Variant. All usages of "type" to refer to classes were renamed to "class" ClassDB has been exposed to GDScript. OBJ_TYPE() macro is now GDCLASS()
* Welcome in 2017, dear changelog reader!Rémi Verschelde2017-01-011-1/+1
| | | | | | | | That year should bring the long-awaited OpenGL ES 3.0 compatible renderer with state-of-the-art rendering techniques tuned to work as low as middle end handheld devices - without compromising with the possibilities given for higher end desktop games of course. Great times ahead for the Godot community and the gamers that will play our games!
* Renamed the bind_native functions to bind_vararg, should make it show the ↵Juan Linietsky2016-09-071-12/+4
| | | | documentation more clearly and also make it easier to bind to C#
* Implemented UndoRedo mergeable modesFranklin Sobrinho2016-08-171-13/+48
|
* remove trailing whitespaceHubert Jarosz2016-03-091-3/+3
|