KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

transform_undo.txt 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. Problem:
  2. When working with the transform tool, the user performs many adjustments.
  3. These adjustments should be aggregated into one transform, and always
  4. performed from the original state of the image, as it was before the
  5. first transformation adjustment was applied -- because otherwise
  6. the quality degradation becomes too bad.
  7. That means that all work with the transform tool should eventually
  8. result in one transform command. However, when working with the transform
  9. tool, the user expects to be able to undo various stages of his transform
  10. actions. And undo should not undo to the original state, but to the previous
  11. state.
  12. When the user selects another tool, the definitive transform is applied.
  13. This happens because selecting another tool calls the clear function of
  14. the transform tool. One transform command should end up on the undo
  15. stack.
  16. When the user selects an action from the menu, like a filter,
  17. the definitive transform should also be applied, and only
  18. then the action from the menu.
  19. Thus, we have two problems:
  20. * Transforms should always be done from the original image, but undoing
  21. the transform command should unto to the previous state.
  22. * Pending transforms should be committed before a menu action is taken.
  23. These problems can be solved in one go, without any of the complications
  24. I created yesterday by always committing the transform to the undo history
  25. in the transform() method, but by performing the transform from the original
  26. paint device, as it was when the tool got activated.
  27. Menu actions should reset the tool: for this we will need my complicated hack,
  28. I propose resetting the transform tool after a command is added.