[gnome-photos] tool-crop: Fix reset
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] tool-crop: Fix reset
- Date: Fri, 19 Feb 2016 18:26:14 +0000 (UTC)
commit e87e477f7352c682f2537b6d9c9735119cf21df9
Author: Rafael Fonseca <r4f4rfs gmail com>
Date: Tue Feb 16 15:41:17 2016 +0100
tool-crop: Fix reset
When resetting a crop, nothing was actually done regarding the
gegl:crop operation still in the pipeline. Because of that, the crop
area would go out of bounds when the user tried to crop the item
again, making it impossible to crop and/or resize the area.
Therefore, instead of adjusting the gegl:crop to cover the entire item
when the tool is active, we remove it from the pipeline altogether.
We add it back, as usual, if the user ended up cropping.
https://bugzilla.gnome.org/show_bug.cgi?id=761683
src/photos-tool-crop.c | 8 +-------
1 files changed, 1 insertions(+), 7 deletions(-)
---
diff --git a/src/photos-tool-crop.c b/src/photos-tool-crop.c
index 80ad95d..83cfa70 100644
--- a/src/photos-tool-crop.c
+++ b/src/photos-tool-crop.c
@@ -1011,13 +1011,7 @@ photos_tool_crop_activate (PhotosTool *tool, PhotosBaseItem *item, PhotosImageVi
self->crop_x = x;
self->crop_y = y;
- photos_base_item_operation_add (item,
- "gegl:crop",
- "height", (gdouble) self->bbox_source.height,
- "width", (gdouble) self->bbox_source.width,
- "x", (gdouble) self->bbox_source.x,
- "y", (gdouble) self->bbox_source.y,
- NULL);
+ photos_base_item_operation_remove (item, "gegl:crop");
photos_base_item_process_async (item, NULL, photos_tool_crop_process, g_object_ref (self));
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]