Commit c4c19933 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

use the same undo group logic as in the text tool. Not really necessary

2004-03-20  Sven Neumann  <sven@gimp.org>

	* app/text/gimptextlayer.c (gimp_text_layer_set): use the same
	undo group logic as in the text tool. Not really necessary since
	this function must not be called on modified text layers, but it's
	more consistent this way.
parent a08efc86
2004-03-20 Sven Neumann <sven@gimp.org>
* app/text/gimptextlayer.c (gimp_text_layer_set): use the same
undo group logic as in the text tool. Not really necessary since
this function must not be called on modified text layers, but it's
more consistent this way.
2004-03-20 Simon Budig <simon@gimp.org>
* app/tools/gimpvectortool.c: Assigned "b" as the default shortcut
......@@ -482,6 +482,7 @@ gimp_text_layer_set (GimpTextLayer *layer,
{
GimpImage *image;
GimpText *text;
gboolean undo_group;
va_list var_args;
g_return_if_fail (gimp_drawable_is_text_layer ((GimpDrawable *) layer));
......@@ -495,7 +496,8 @@ gimp_text_layer_set (GimpTextLayer *layer,
/* If the layer contains a mask,
* gimp_text_layer_render() might have to resize it.
*/
if (GIMP_LAYER (layer)->mask)
undo_group = ((GIMP_LAYER (layer)->mask != NULL) || layer->modified);
if (undo_group)
gimp_image_undo_group_start (image, GIMP_UNDO_GROUP_TEXT, undo_desc);
gimp_image_undo_push_text_layer (image, undo_desc, layer);
......@@ -506,7 +508,7 @@ gimp_text_layer_set (GimpTextLayer *layer,
va_end (var_args);
if (GIMP_LAYER (layer)->mask)
if (undo_group)
gimp_image_undo_group_end (image);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment