Commit Graph

3 Commits

Author SHA1 Message Date
Michael Natterer 96ebc6f848 app: add "new_precision" argument to gimp_drawable_convert_type()
for clarity and consistency with the "new_base_type" argument.
2012-05-02 17:51:15 +02:00
Michael Natterer 717b4e6a07 Fix undoing a group layer type conversion
* app/core/gimpdrawable.[ch]: add "gboolean push_undo" to
  GimpDrawable::convert_type().

* app/core/gimpdrawable-convert.[ch]: same here for the gray and rgb
  conversion functions.

* app/core/gimpchannel.c
* app/core/gimplayer.c: pass FALSE when called from GimpItem::convert()
  because it can be called on unattached items only.

* app/core/gimpimage-convert.c: pass TRUE.

* app/core/core-enums.[ch]
* app/core/gimpgrouplayerundo.[ch]
* app/core/gimpimage-undo-push.[ch]: add GIMP_UNDO_GROUP_LAYER_CONVERT
  which simply calls gimp_drawable_convert_type() with the old type
  when undone/redone.

* app/core/gimpgrouplayer.c: push a group layer convert undo so this
  can be properly undone/redone.
2009-09-13 19:24:19 +02:00
Michael Natterer 4df9b25217 Add facility to compress multiple group layer resizings into one
* app/core/gimpgrouplayer.[ch]: add gimp_group_layer_suspend_resize()
  and gimp_group_layer_resume_resize() and call them around functions
  where all a group's children are transformed (translated, resized
  etc).  This way we go from the worst case of reallocating the
  group's projection tiles once for each child down to exactly one
  reallocation.

* app/core/Makefile.am
* app/core/core-enums.[ch]
* app/core/core-types.h
* app/core/gimpimage-undo-push.[ch]
* app/core/gimpgrouplayerundo.[ch]: add new undo class
  GimpGroupLayerUndo which implements undos for suspend/resume of
  group layers and calls them in reverse order when undoing.
2009-09-07 13:12:54 +02:00