]> err.no Git - libchamplain/commitdiff
Fix a bug where shadow would show up for image only markers
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 3 May 2009 19:02:41 +0000 (15:02 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Sun, 3 May 2009 19:02:41 +0000 (15:02 -0400)
champlain/champlain-marker.c

index 7e8dc6c4d89325b71442bf13c9927aca62d5ce9d..7f0abff24c555b4f3f8964f6207cd148301a543d 100644 (file)
@@ -593,12 +593,22 @@ draw_marker (ChamplainMarker *marker)
       draw_shadow (marker, total_width, total_height, point);
       draw_background (marker, total_width, total_height, point);
     }
-  else if (priv->background != NULL)
-    {
-      clutter_container_remove_actor (CLUTTER_CONTAINER (marker), priv->background);
-      g_object_unref (G_OBJECT (priv->background));
-      priv->background = NULL;
-    }
+  else
+  {
+    if (priv->background != NULL)
+      {
+        clutter_container_remove_actor (CLUTTER_CONTAINER (marker), priv->background);
+        g_object_unref (G_OBJECT (priv->background));
+        priv->background = NULL;
+      }
+
+    if (priv->shadow != NULL)
+      {
+        clutter_container_remove_actor (CLUTTER_CONTAINER (marker), priv->shadow);
+        g_object_unref (G_OBJECT (priv->shadow));
+        priv->shadow = NULL;
+      }
+  }
 
   if (priv->text_actor != NULL && priv->background != NULL)
     clutter_actor_raise (priv->text_actor, priv->background);