[gimp/gimp-2-8] Bug 656522 - Scaled Image Rounds Up To Nearest Pixel
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-8] Bug 656522 - Scaled Image Rounds Up To Nearest Pixel
- Date: Wed, 27 Mar 2013 00:07:41 +0000 (UTC)
commit 333b05be02a39ca3b15ab1318c049fd29fc9d3ef
Author: Téo Mazars <teo mazars ensimag fr>
Date: Sun Feb 24 16:48:33 2013 +0100
Bug 656522 - Scaled Image Rounds Up To Nearest Pixel
Prevent gimp_coordinates_callback () to be called recursively
when x and y are chained.
One call puts all values in a consistent state, a recusive call can
cause side effects (calculations with rounded values)
(cherry picked from commit 24a2113170fbc3c81590d873be40d6544ab95377)
libgimpwidgets/gimpwidgets.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/libgimpwidgets/gimpwidgets.c b/libgimpwidgets/gimpwidgets.c
index b0bbbb7..b2e91b1 100644
--- a/libgimpwidgets/gimpwidgets.c
+++ b/libgimpwidgets/gimpwidgets.c
@@ -588,6 +588,10 @@ gimp_coordinates_callback (GtkWidget *widget,
{
if ((data->orig_x != 0) && (data->orig_y != 0))
{
+ g_signal_handlers_block_by_func (widget,
+ gimp_coordinates_callback,
+ data);
+
if (ROUND (new_x) != ROUND (data->last_x))
{
data->last_x = new_x;
@@ -608,6 +612,10 @@ gimp_coordinates_callback (GtkWidget *widget,
data->last_x
= gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (widget), 0);
}
+
+ g_signal_handlers_unblock_by_func (widget,
+ gimp_coordinates_callback,
+ data);
}
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]