mirror of https://github.com/GNOME/gimp.git
app: update drawable bounding box when floating-selection bounding box changes
When the bounding box of a floating selection changes, update the bounding box of the associated drawable, since floating selections are no longer clipped to the drawable's bounds in general.
This commit is contained in:
parent
d17dc3112f
commit
ec6bbd1937
|
@ -60,6 +60,8 @@ static void gimp_drawable_fs_visibility_changed (GimpLayer *fs
|
||||||
GimpDrawable *drawable);
|
GimpDrawable *drawable);
|
||||||
static void gimp_drawable_fs_excludes_backdrop_changed (GimpLayer *fs,
|
static void gimp_drawable_fs_excludes_backdrop_changed (GimpLayer *fs,
|
||||||
GimpDrawable *drawable);
|
GimpDrawable *drawable);
|
||||||
|
static void gimp_drawable_fs_bounding_box_changed (GimpLayer *fs,
|
||||||
|
GimpDrawable *drawable);
|
||||||
static void gimp_drawable_fs_update (GimpLayer *fs,
|
static void gimp_drawable_fs_update (GimpLayer *fs,
|
||||||
gint x,
|
gint x,
|
||||||
gint y,
|
gint y,
|
||||||
|
@ -110,6 +112,9 @@ gimp_drawable_attach_floating_sel (GimpDrawable *drawable,
|
||||||
g_signal_connect (fs, "excludes-backdrop-changed",
|
g_signal_connect (fs, "excludes-backdrop-changed",
|
||||||
G_CALLBACK (gimp_drawable_fs_excludes_backdrop_changed),
|
G_CALLBACK (gimp_drawable_fs_excludes_backdrop_changed),
|
||||||
drawable);
|
drawable);
|
||||||
|
g_signal_connect (fs, "bounding-box-changed",
|
||||||
|
G_CALLBACK (gimp_drawable_fs_bounding_box_changed),
|
||||||
|
drawable);
|
||||||
g_signal_connect (fs, "update",
|
g_signal_connect (fs, "update",
|
||||||
G_CALLBACK (gimp_drawable_fs_update),
|
G_CALLBACK (gimp_drawable_fs_update),
|
||||||
drawable);
|
drawable);
|
||||||
|
@ -143,6 +148,9 @@ gimp_drawable_detach_floating_sel (GimpDrawable *drawable)
|
||||||
g_signal_handlers_disconnect_by_func (fs,
|
g_signal_handlers_disconnect_by_func (fs,
|
||||||
gimp_drawable_fs_excludes_backdrop_changed,
|
gimp_drawable_fs_excludes_backdrop_changed,
|
||||||
drawable);
|
drawable);
|
||||||
|
g_signal_handlers_disconnect_by_func (fs,
|
||||||
|
gimp_drawable_fs_bounding_box_changed,
|
||||||
|
drawable);
|
||||||
g_signal_handlers_disconnect_by_func (fs,
|
g_signal_handlers_disconnect_by_func (fs,
|
||||||
gimp_drawable_fs_update,
|
gimp_drawable_fs_update,
|
||||||
drawable);
|
drawable);
|
||||||
|
@ -459,6 +467,13 @@ gimp_drawable_fs_excludes_backdrop_changed (GimpLayer *fs,
|
||||||
gimp_drawable_update (drawable, 0, 0, -1, -1);
|
gimp_drawable_update (drawable, 0, 0, -1, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gimp_drawable_fs_bounding_box_changed (GimpLayer *fs,
|
||||||
|
GimpDrawable *drawable)
|
||||||
|
{
|
||||||
|
gimp_drawable_update_bounding_box (drawable);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
gimp_drawable_fs_update (GimpLayer *fs,
|
gimp_drawable_fs_update (GimpLayer *fs,
|
||||||
gint x,
|
gint x,
|
||||||
|
|
Loading…
Reference in New Issue