[libchamplain] Fix behavior in multiple mode
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Subject: [libchamplain] Fix behavior in multiple mode
- Date: Tue, 28 Jul 2009 21:39:43 +0000 (UTC)
commit 0fa51eb3441b50483d1dd5672dc20bff3247c5df
Author: Pierre-Luc Beaudoin <pierre-luc pierlux com>
Date: Mon Jul 27 20:50:27 2009 -0400
Fix behavior in multiple mode
Clicking on one selected marker in a group of selected marker
should highlight only this marker.
champlain/champlain-selection-layer.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/champlain/champlain-selection-layer.c b/champlain/champlain-selection-layer.c
index 4a4ac79..d881b33 100644
--- a/champlain/champlain-selection-layer.c
+++ b/champlain/champlain-selection-layer.c
@@ -146,17 +146,15 @@ real_select (ChamplainSelectionLayer *layer,
if (!append)
champlain_selection_layer_unselect_all (layer);
-
- if (was_selected)
+ else if (was_selected)
{
champlain_selection_layer_unselect (layer, marker);
+ return;
}
- else
- {
- g_object_ref (marker);
- g_object_set (marker, "highlighted", TRUE, NULL);
- layer->priv->selection = g_list_append (layer->priv->selection, marker);
- }
+
+ g_object_ref (marker);
+ g_object_set (marker, "highlighted", TRUE, NULL);
+ layer->priv->selection = g_list_append (layer->priv->selection, marker);
}
}
@@ -167,7 +165,8 @@ marker_clicked_cb (ClutterActor *actor,
{
real_select (CHAMPLAIN_SELECTION_LAYER (user_data),
- CHAMPLAIN_BASE_MARKER (actor), (event->modifier_state & CLUTTER_CONTROL_MASK));
+ CHAMPLAIN_BASE_MARKER (actor),
+ (event->modifier_state & CLUTTER_CONTROL_MASK));
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]