Revision 5e3703dc3b0292695d1dfeca6dd74bedaef0f5b5 authored by Pascal Obry on 30 December 2016, 09:41:58 UTC, committed by Pascal Obry on 16 January 2017, 21:54:23 UTC
The implementation of the undo/redo was simple but was letting the
complexity in the hand of the API users. In fact there was a need
to keep a prev state and and a current state, and to record only
previous states and not the current one. This was mostly working
(except for a redo bug discoverred while working on this new
implementation) but was tedious.

The new undo implementation is more complex but makes it far easier
to use. That is, modules can just record the current state and they
don't need to keep a previous state at all.

The undo history and map support has been reimplemented with this
new semantics and have been cleaned-up as a consequence.

This work has been highly motivated by the fact that we want to support
undo/redo for masks and that it was far too complex to do right with
the previous implementation.
1 parent d8e7d14
Raw File
.clang-format
---
AccessModifierOffset: -2
ConstructorInitializerIndentWidth: 2
AlignEscapedNewlinesLeft: false
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false # otherwise the braces behind if(...) get moved up
AllowShortFunctionsOnASingleLine: false # change to SFS_Emtpy once it is supported
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakTemplateDeclarations: false
AlwaysBreakBeforeMultilineStrings: false
BreakBeforeBinaryOperators: true
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: true
BinPackParameters: true
ColumnLimit:     115   # needed for the modelines
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerBinding: false
#ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
Language: Cpp
MaxEmptyLinesToKeep: 3
NamespaceIndentation: None
ObjCSpaceBeforeProtocolList: true
PenaltyBreakComment: 60
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 50
PenaltyReturnTypeOnItsOwnLine: 60
PointerBindsToType: false
SpaceAfterCStyleCast: false
SpacesBeforeTrailingComments: 1
Cpp11BracedListStyle: false
Standard:        Cpp03
IndentWidth:     2
TabWidth:        2
UseTab:          Never
BreakBeforeBraces: Allman
IndentFunctionDeclarationAfterType: false
SpacesInParentheses: false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpaceAfterControlStatementKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: Never
SpacesInSquareBrackets: false
...

back to top