colorscale: Remove some duplicated code
authorTimm Bäder <mail@baedert.org>
Sat, 12 Oct 2019 15:53:59 +0000 (17:53 +0200)
committerTimm Bäder <mail@baedert.org>
Sat, 12 Oct 2019 15:59:23 +0000 (17:59 +0200)
gtk/gtkcolorscale.c

index 0ee32118dbec4f80057b9630cc2b0076b78e37ac..daf350ebb069f3a9e736260d00ebf37814729b86 100644 (file)
@@ -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)
     {