Skip to content

Storyboard undo/redo

Saurabh Kumar requested to merge confifu/krita:confifu/Storyboard-Undo into master

Implementation of undo/redo for storyboard addition and deletion.

These are the changes in this MR :

  • Renamed slotInsertChildRows to insertChildRows and call it explicitly whenever a first level node is added.
  • Added a TotalDurationInFrames and TotalDurationInSeconds data roles as this functionality was used in quite a lot of places.
  • Changed the removeRows function so that the deleted scenes duration will always get added to the previous scene. Previously this didn't happen with the last scene.
  • Changed the lastKeyframeWithin(QModelIndex) function to use the next scene's frame number whenever possible.
  • Disconnected unused signals for keyframe addition and deletion.
  • setData return false for duration fields if implicitSceneDuration is equal to total duration in frames for the scene.
  • Implemented the command classes that inherits from KUndo2Command and added proper commands to stack whenever scenes are added, deleted or moved or when scene duration is changed.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Saurabh Kumar

Merge request reports

Loading