-
Ell authored
Add gimp_item_{start,end}_move(), and corresponding GimpItem::{start,end}_move() virtual functions, which should be called before/after "moving" the item (i.e., translating, scaling, resizing, flipping, rotating, or transforming the item). Moves performed between the outermost pair of start/end calls are treated atomically. What exactly does "treated atomically" entail depends on the subclasses -- GimpItem doesn't provide a default implementation for these functions, so the current commit doesn't change any behavior. The next commit, which adds layer-mask support for group layers, uses the functions to avoid cropping the mask too early while a child is moving. GimpItem calls {start,end}_move() in the various "move" functions (gimp_item_{translate,scale,...}(), before performing the actual operation. Additionally we call the functions in the gimp_image_item_list_foo() functions, for each participating item, so that the items are moved as a unit. We call the functions in the various gimp_image_remove_foo() functions, since removing an item may affect the size of its ancestors, and is therefore akin to moving. We also call the functions in GimpEditSelectionTool, so that the move tool moves items atomically while dragging.
02a20c6c