[gtk+/wip/baedert/gtkimageview: 109/169] GtkImageView: Don't call fix_anchor if fit-allocation is set



commit b0a05a9d85819654f6dc7d042b57a58746b1766c
Author: Timm Bäder <mail baedert org>
Date:   Mon Jan 25 16:51:02 2016 +0100

    GtkImageView: Don't call fix_anchor if fit-allocation is set
    
    Doesn't make much sense in that case.

 gtk/gtkimageview.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkimageview.c b/gtk/gtkimageview.c
index af3a246..aad31dc 100644
--- a/gtk/gtkimageview.c
+++ b/gtk/gtkimageview.c
@@ -714,8 +714,7 @@ gesture_rotate_changed_cb (GtkGestureRotate *gesture,
   priv->size_valid = FALSE;
   gtk_image_view_update_adjustments (image_view);
 
-  if (priv->hadjustment && priv->vadjustment &&
-      !priv->fit_allocation)
+  if (priv->hadjustment && priv->vadjustment && !priv->fit_allocation)
     gtk_image_view_fix_anchor (image_view,
                                priv->anchor_x,
                                priv->anchor_y,
@@ -1221,8 +1220,7 @@ gtk_image_view_set_angle (GtkImageView *image_view,
   // TODO: Would we have to document this behavior? Or make it configurable?
 
 
-  if (priv->hadjustment != NULL && priv->vadjustment != NULL &&
-      !priv->fit_allocation)
+  if (priv->hadjustment && priv->vadjustment && !priv->fit_allocation)
     gtk_image_view_fix_anchor (image_view,
                                priv->anchor_x,
                                priv->anchor_y,
@@ -1332,7 +1330,6 @@ gtk_image_view_set_fit_allocation (GtkImageView *image_view,
   gtk_image_view_update_adjustments (image_view);
 
   gtk_widget_queue_resize (GTK_WIDGET (image_view));
-  gtk_image_view_update_adjustments (image_view);
 }
 
 gboolean


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]