if we pick a layer to move and this layer has a mask which is being edited

2004-03-04  Michael Natterer  <mitch@gimp.org>

	* app/tools/gimpmovetool.c (gimp_move_tool_button_press): if we
	pick a layer to move and this layer has a mask which is being
	edited (active), start moving the mask, not the layer.
This commit is contained in:
Michael Natterer 2004-03-04 21:01:26 +00:00 committed by Michael Natterer
parent 4b326ee126
commit f3df250a74
2 changed files with 16 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-03-04 Michael Natterer <mitch@gimp.org>
* app/tools/gimpmovetool.c (gimp_move_tool_button_press): if we
pick a layer to move and this layer has a mask which is being
edited (active), start moving the mask, not the layer.
2004-03-04 Sven Neumann <sven@gimp.org>
* app/config/gimprc-blurbs.h: marked new strings for translation.

View File

@ -331,8 +331,17 @@ gimp_move_tool_button_press (GimpTool *tool,
else
{
/* Otherwise, init the edit selection */
GimpLayerMask *layer_mask;
gimp_image_set_active_layer (gdisp->gimage, layer);
init_edit_selection (tool, gdisp, coords, EDIT_LAYER_TRANSLATE);
layer_mask = gimp_layer_get_mask (layer);
if (layer_mask && gimp_layer_mask_get_edit (layer_mask))
init_edit_selection (tool, gdisp, coords, EDIT_LAYER_MASK_TRANSLATE);
else
init_edit_selection (tool, gdisp, coords, EDIT_LAYER_TRANSLATE);
}
}
}