]> git.sur5r.net Git - glabels/commitdiff
2008-02-04 Jim Evins <evins@snaught.com>
authorJim Evins <evins@snaught.com>
Tue, 5 Feb 2008 02:03:08 +0000 (02:03 +0000)
committerJim Evins <evins@snaught.com>
Tue, 5 Feb 2008 02:03:08 +0000 (02:03 +0000)
* src/view-image.c: (update_object_from_editor_cb):
Bug #1886438.  Don't update the image size unless it is actually
triggered by a change in image source.  The result of this bug
was that any attempt to edit the size spinboxes, immediately
reset the size.

git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@746 f5e0f49d-192f-0410-a22d-a8d8700d0965

glabels2/ChangeLog
glabels2/src/view-image.c

index 1f6031a124f7fa2b7a464863d212190f4548d912..5c032149ee2298fd8e0604e91bab1a9ef92d6a17 100644 (file)
@@ -1,3 +1,11 @@
+2008-02-04  Jim Evins  <evins@snaught.com>
+
+       * src/view-image.c: (update_object_from_editor_cb):
+               Bug #1886438.  Don't update the image size unless it is actually
+               triggered by a change in image source.  The result of this bug
+               was that any attempt to edit the size spinboxes, immediately
+               reset the size.
+       
 2008-02-03  Jim Evins  <evins@snaught.com>
 
        * src/label-image.c: (gl_label_image_class_init), (set_size):
index 8e72241cb15cf8e6d318fb5422c0531f44307b1b..7612284d7564d050c7a3750191af62f8a1b4b362 100644 (file)
@@ -206,6 +206,7 @@ update_object_from_editor_cb (glObjectEditor *editor,
        glTextNode        *filename;
        const GdkPixbuf   *pixbuf;
        gdouble            image_w, image_h;
+       gdouble            new_w, new_h;
 
        gl_debug (DEBUG_VIEW, "START");
 
@@ -228,8 +229,11 @@ update_object_from_editor_cb (glObjectEditor *editor,
        gl_text_node_free (&filename);
 
        /* Setting filename may have modified the size. */
-       gl_label_object_get_size (object, &w, &h);
-       gl_object_editor_set_size (editor, w, h);
+       gl_label_object_get_size (object, &new_w, &new_h);
+        if ( (new_w != w) || (new_h != h) )
+        {
+                gl_object_editor_set_size (editor, new_w, new_h);
+        }
 
        /* It may also have a new base size. */
         pixbuf = gl_label_image_get_pixbuf (GL_LABEL_IMAGE(object), NULL);