]> err.no Git - libchamplain/commitdiff
Eat selection events
authorPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Tue, 28 Jul 2009 00:37:33 +0000 (20:37 -0400)
committerPierre-Luc Beaudoin <pierre-luc@pierlux.com>
Tue, 28 Jul 2009 21:23:18 +0000 (17:23 -0400)
This prevents unreactive (by user) markers to pass the
click event to the stage to unselect all markers.

champlain/champlain-selection-layer.c
champlain/champlain-view.c

index c2e7cc1986e23f396ebf7dea922b229abeec75dc..4a4ac79745042035122717e6a55c6e35778d9c1b 100644 (file)
@@ -169,7 +169,7 @@ marker_clicked_cb (ClutterActor *actor,
   real_select (CHAMPLAIN_SELECTION_LAYER (user_data),
       CHAMPLAIN_BASE_MARKER (actor), (event->modifier_state & CLUTTER_CONTROL_MASK));
 
-  return FALSE;
+  return TRUE;
 }
 
 static void
index e168df677f7cf4c5ae54a674d886d1d1fb525932..75fcda3ecb20fa1d5a1a99558b2b07caa341ebce 100644 (file)
@@ -938,18 +938,22 @@ button_release_cb (ClutterActor *actor,
                 ChamplainView *view)
 {
   GList *children = NULL;
+  gboolean found = FALSE;
   ChamplainViewPrivate *priv = view->priv;
 
   children = clutter_container_get_children (CLUTTER_CONTAINER (priv->user_layers));
   for (;children != NULL; children = g_list_next (children))
     {
       if (CHAMPLAIN_IS_SELECTION_LAYER (children->data))
-        champlain_selection_layer_unselect_all (CHAMPLAIN_SELECTION_LAYER (children->data));
+        {
+          champlain_selection_layer_unselect_all (CHAMPLAIN_SELECTION_LAYER (children->data));
+          found = TRUE;
+        }
     }
 
   g_list_free (children);
 
-  return FALSE;
+  return found;
 }