[gthumb/gthumb-3-6] crop tool: wrong initial selection size
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb/gthumb-3-6] crop tool: wrong initial selection size
- Date: Fri, 11 Jan 2019 10:22:21 +0000 (UTC)
commit 9a7b4aba891324e1ce2510f21e87cc6699af5718
Author: Paolo Bacchilega <paobac src gnome org>
Date: Thu Jan 10 19:03:27 2019 +0100
crop tool: wrong initial selection size
gthumb/gth-image-selector.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/gthumb/gth-image-selector.c b/gthumb/gth-image-selector.c
index fafa729a..d8fc913c 100644
--- a/gthumb/gth-image-selector.c
+++ b/gthumb/gth-image-selector.c
@@ -1562,6 +1562,16 @@ selection_is_valid (GthImageSelector *self)
}
+static void
+update_selection (GthImageSelector *self)
+{
+ cairo_rectangle_int_t selection;
+
+ gth_image_selector_get_selection (self, &selection);
+ set_selection (self, selection, TRUE);
+}
+
+
static void
gth_image_selector_image_changed (GthImageViewerTool *base)
{
@@ -1587,17 +1597,15 @@ gth_image_selector_image_changed (GthImageViewerTool *base)
if (! selection_is_valid (self))
init_selection (self);
+ else
+ update_selection (self);
}
static void
gth_image_selector_zoom_changed (GthImageViewerTool *base)
{
- GthImageSelector *self = GTH_IMAGE_SELECTOR (base);
- cairo_rectangle_int_t selection;
-
- gth_image_selector_get_selection (self, &selection);
- set_selection (self, selection, TRUE);
+ update_selection (GTH_IMAGE_SELECTOR (base));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]