https://bugs.kde.org/show_bug.cgi?id=459524

Halla Rempt <ha...@valdyas.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/grap
                   |                            |hics/krita/commit/4f2674db8
                   |                            |8ae8ef115a3cd302b3ddaf24057
                   |                            |51cb
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #12 from Halla Rempt <ha...@valdyas.org> ---
Git commit 4f2674db88ae8ef115a3cd302b3ddaf2405751cb by Halla Rempt.
Committed on 27/01/2023 at 14:32.
Pushed by rempt into branch 'master'.

Add undo, redo and lock functionality to the palette docker

Each KoColorSet now has its own undo stack. All palette
modifying api in KoColorSet now creates an undo command.
There are buttons in the palette docker to undo and redo.
The ctrl-z/ctrl-shift shortcuts don't work for this
undostack, because of focus problems.

There is also a lock button that if toggled prevents any
modifying api in KoColorSet from being used. The lock
status is not stored in any settings or in the resource
database, so on restart every palette is unlocked again.

Other changes:

* it became necessary to refactor KisPaletteModel,
KisPaletteView and KisPaletteEditor to not duplicate the
state of the KoColorSet
* KisSwatchGroup is now always handled through a shared
pointer instead of sometimes as a raw pointer and sometimes
as a reference
* KoColorSetTest now tests the entire modification API.

Question: should the undo stack be cleared on saving the
palette?

M  +14   -14   libs/libkis/Palette.cpp
M  +4    -4    libs/libkis/Palette.h
M  +1    -1    libs/libkis/PaletteView.cpp
M  +1    -0    libs/pigment/CMakeLists.txt
M  +1    -1    libs/pigment/KoColorProfileStorage.cpp
M  +22   -20   libs/pigment/resources/KisSwatchGroup.cpp
M  +54   -25   libs/pigment/resources/KisSwatchGroup.h
M  +712  -200  libs/pigment/resources/KoColorSet.cpp
M  +115  -35   libs/pigment/resources/KoColorSet.h
M  +23   -9    libs/pigment/resources/KoColorSet_p.h
M  +37   -29   libs/pigment/tests/TestKisSwatchGroup.cpp
M  +449  -0    libs/pigment/tests/TestKoColorSet.cpp
M  +24   -0    libs/pigment/tests/TestKoColorSet.h
M  +3    -3    libs/resources/KoResource.cpp
M  +51   -51   libs/ui/KisPaletteEditor.cpp
M  +18   -20   libs/ui/KisPaletteEditor.h
M  +2    -2    libs/ui/dialogs/KisDlgPaletteEditor.cpp
M  +1    -1    libs/widgets/KisDlgInternalColorSelector.cpp
M  +9    -12   libs/widgets/KisPaletteComboBox.cpp
M  +9    -6    libs/widgets/KisPaletteComboBox.h
M  +22   -33   libs/widgets/KisPaletteDelegate.cpp
M  +0    -5    libs/widgets/KisPaletteDelegate.h
M  +80   -115  libs/widgets/KisPaletteModel.cpp
M  +50   -79   libs/widgets/KisPaletteModel.h
M  +2    -2    libs/widgets/KoColorSetWidget.cpp
M  +45   -32   libs/widgets/kis_palette_view.cpp
M  +7    -3    libs/widgets/kis_palette_view.h
M  +1    -0    libs/widgets/tests/CMakeLists.txt
A  +363  -0    libs/widgets/tests/TestKisPaletteModel.cpp     [License:
GPL(v2.0+)]
A  +56   -0    libs/widgets/tests/TestKisPaletteModel.h     [License:
GPL(v2.0+)]
M  +104  -32   plugins/dockers/palettedocker/palettedocker_dock.cpp
M  +9    -1    plugins/dockers/palettedocker/palettedocker_dock.h
M  +77   -38   plugins/dockers/palettedocker/wdgpalettedock.ui
M  +1    -1    plugins/extensions/layersplit/layersplit.cpp
M  +4    -4    plugins/extensions/pykrita/sip/krita/Palette.sip
M  +2    -2    plugins/tools/basictools/kis_tool_colorsampler.cc
M  +15   -16  
plugins/tools/tool_lazybrush/kis_tool_lazy_brush_options_widget.cpp
M  +1    -4   
plugins/tools/tool_lazybrush/kis_tool_lazy_brush_options_widget.h

https://invent.kde.org/graphics/krita/commit/4f2674db88ae8ef115a3cd302b3ddaf2405751cb

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to