Bug 329175

Summary: Properties dialog adds commands to history when nothing has changed
Product: [Applications] umbrello Reporter: Joris Steyn <kde>
Component: generalAssignee: Joris Steyn <kde>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description Joris Steyn 2013-12-23 23:03:43 UTC
The command history gets cluttered with commands that do not actually change anything.

Reproducible: Always

Steps to Reproduce:
1. Add a class widget to a diagram
2. Open the widget properties dialog
3. Click OK
Actual Results:  
Commands for rename, visibility- and misc. color changes are added to the undo stack.

Expected Results:  
Nothing should happen because nothing was changed.
Comment 1 Joris Steyn 2013-12-24 09:01:52 UTC
Git commit 5b0bf1ecf393c4c1d9cfb7fe7f058e4a54ee1177 by Joris Steyn.
Committed on 23/12/2013 at 16:50.
Pushed by jorissteyn into branch 'master'.

Undo stack and visual properties improvements

The multi-widget context menu allows setting visual properties ("Show") for a
selection. Unlike the previous "toggle" behaviour it is now possible to (for
example) hide all operations with one menu action.

Also fixed:
* applying the properties dialog without changes added a few undo commands to the stack
* the "Delete" shortcut is renamed to "Delete Diagram" because that is what it does
* mixed capitalization cmd/Cmd, is now always "Cmd"
* changes to the following widget options are now tracked in the undo stack:
** visual properties
** use fill color
** line width
** font
Related: bug 329176

M  +4    -1    umbrello/CMakeLists.txt
M  +4    -1    umbrello/cmds.h
M  +2    -2    umbrello/cmds/widget/cmd_changeFillColor.cpp
R  +9    -14   umbrello/cmds/widget/cmd_changeFont.cpp [from: umbrello/cmds/widget/cmd_changeFontSelection.cpp - 062% similarity]
C  +8    -10   umbrello/cmds/widget/cmd_changeFont.h [from: umbrello/cmds/widget/cmd_changeFontSelection.h - 073% similarity]
M  +4    -11   umbrello/cmds/widget/cmd_changeLineColor.cpp
M  +1    -0    umbrello/cmds/widget/cmd_changeLineColor.h
C  +11   -11   umbrello/cmds/widget/cmd_changeLineWidth.cpp [from: umbrello/cmds/widget/cmd_changeTextColor.cpp - 071% similarity]
C  +8    -9    umbrello/cmds/widget/cmd_changeLineWidth.h [from: umbrello/cmds/widget/cmd_changeLineColor.h - 073% similarity]
M  +4    -2    umbrello/cmds/widget/cmd_changeTextColor.cpp
M  +1    -0    umbrello/cmds/widget/cmd_changeTextColor.h
C  +14   -12   umbrello/cmds/widget/cmd_changeUseFillColor.cpp [from: umbrello/cmds/widget/cmd_changeTextColor.cpp - 066% similarity]
R  +12   -13   umbrello/cmds/widget/cmd_changeUseFillColor.h [from: umbrello/cmds/widget/cmd_changeFontSelection.h - 067% similarity]
C  +17   -13   umbrello/cmds/widget/cmd_changeVisualProperty.cpp [from: umbrello/cmds/widget/cmd_changeTextColor.cpp - 061% similarity]
C  +12   -10   umbrello/cmds/widget/cmd_changeVisualProperty.h [from: umbrello/cmds/widget/cmd_changeLineColor.h - 063% similarity]
M  +77   -25   umbrello/listpopupmenu.cpp
M  +31   -20   umbrello/listpopupmenu.h
M  +2    -1    umbrello/uml.cpp
M  +6    -2    umbrello/umlobject.cpp
M  +54   -52   umbrello/umlscene.cpp
M  +5    -1    umbrello/umlscene.h
M  +26   -18   umbrello/widgets/classifierwidget.cpp
M  +1    -0    umbrello/widgets/classifierwidget.h
M  +49   -9    umbrello/widgets/umlwidget.cpp
M  +7    -4    umbrello/widgets/umlwidget.h
M  +73   -13   umbrello/widgets/widgetbase.cpp
M  +1    -1    umbrello/widgets/widgetbase.h

http://commits.kde.org/umbrello/5b0bf1ecf393c4c1d9cfb7fe7f058e4a54ee1177