[gtk/wip/baedert/for-master] colorscale: Remove some duplicated code



commit af624849b8800f5a15483c1bf59b77dd54f9e3c2
Author: Timm Bäder <mail baedert org>
Date:   Sat Oct 12 17:53:59 2019 +0200

    colorscale: Remove some duplicated code

 gtk/gtkcolorscale.c | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/gtk/gtkcolorscale.c b/gtk/gtkcolorscale.c
index 0ee32118db..daf350ebb0 100644
--- a/gtk/gtkcolorscale.c
+++ b/gtk/gtkcolorscale.c
@@ -105,18 +105,12 @@ gtk_color_scale_snapshot_trough (GtkColorScale  *scale,
                                             bytes,
                                             stride);
           g_bytes_unref (bytes);
-
-          gtk_snapshot_append_texture (snapshot,
-                                       texture,
-                                       &GRAPHENE_RECT_INIT(0, 0, width, height));
           priv->hue_texture = texture;
         }
-      else
-        {
-          gtk_snapshot_append_texture (snapshot,
-                                       priv->hue_texture,
-                                       &GRAPHENE_RECT_INIT(0, 0, width, height));
-        }
+
+      gtk_snapshot_append_texture (snapshot,
+                                   priv->hue_texture,
+                                   &GRAPHENE_RECT_INIT(0, 0, width, height));
     }
   else if (priv->type == GTK_COLOR_SCALE_ALPHA)
     {


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