[libchamplain/libchamplain-0-4] Don't eat clicks if using a ChamplainSelectionLayer



commit 58f174ed09bae2d7c36fff5e82ff5fe14444e987
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date:   Sat Jan 9 14:30:49 2010 -0500

    Don't eat clicks if using a ChamplainSelectionLayer

 champlain/champlain-view.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/champlain/champlain-view.c b/champlain/champlain-view.c
index d7a3a5d..98f1033 100644
--- a/champlain/champlain-view.c
+++ b/champlain/champlain-view.c
@@ -1083,10 +1083,14 @@ button_release_cb (ClutterActor *actor,
   gboolean found = FALSE;
   ChamplainViewPrivate *priv = view->priv;
 
+  if (clutter_event_get_button (event) != 1)
+    return FALSE;
+
   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))
+      if (CHAMPLAIN_IS_SELECTION_LAYER (children->data) &&
+          champlain_selection_layer_count_selected_markers (CHAMPLAIN_SELECTION_LAYER (children->data)) > 0)
         {
           champlain_selection_layer_unselect_all (CHAMPLAIN_SELECTION_LAYER (children->data));
           found = TRUE;



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