Skip to content

Add undo, redo and lock functionality to the palette docker

Halla Rempt requested to merge work/rempt/bug_459524 into master

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.

CCBUG:459524

Edited by Halla Rempt

Merge request reports

Loading