app: gimp_paint_core_expand_drawable will return boolean
This function returns TRUE if the drawable is expanded. Otherwise, it will return FALSE. This removes the need to check width and height of the drawable to infer the same.
This commit is contained in:
parent
95f795008f
commit
5fdee7c5e7
2 changed files with 9 additions and 5 deletions
|
|
@ -793,7 +793,8 @@ gimp_paint_core_get_show_all (GimpPaintCore *core)
|
|||
return core->show_all;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
gboolean
|
||||
gimp_paint_core_expand_drawable (GimpPaintCore *core,
|
||||
GimpDrawable *drawable,
|
||||
GimpPaintOptions *options,
|
||||
|
|
@ -837,13 +838,13 @@ gimp_paint_core_expand_drawable (GimpPaintCore *core,
|
|||
y2 < -drawable_offset_y || y1 > image_height - drawable_offset_y;
|
||||
|
||||
if (gimp_item_get_lock_position (GIMP_ITEM (drawable)))
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (!gimp_paint_core_get_show_all (core) && outside_image)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (!options->expand_use)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (x1 < 0)
|
||||
{
|
||||
|
|
@ -983,7 +984,10 @@ gimp_paint_core_expand_drawable (GimpPaintCore *core,
|
|||
GEGL_RECTANGLE (*new_off_x, *new_off_y, 0, 0));
|
||||
g_hash_table_insert (core->undo_buffers, drawable, new_buffer);
|
||||
g_object_unref (undo_buffer);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ void gimp_paint_core_set_show_all (GimpPaintCore *core,
|
|||
gboolean show_all);
|
||||
gboolean gimp_paint_core_get_show_all (GimpPaintCore *core);
|
||||
|
||||
void gimp_paint_core_expand_drawable (GimpPaintCore *paint_core,
|
||||
gboolean gimp_paint_core_expand_drawable (GimpPaintCore *paint_core,
|
||||
GimpDrawable *drawable,
|
||||
GimpPaintOptions *paint_options,
|
||||
gint x1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue