Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2010-01-11 11:18:16 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2010-01-11 11:20:17 (GMT)
commitb4b109f954781cdcdcfb90202868d2f7efb43e40 (patch)
tree6d261af3f3d6cc494e589226ee1050711b82d5a7
parent571c029b39457f4971a58f73819f67bd5dcd5145 (diff)
[libview] Don't emit selection-changed when selection doesn't change after clear_selection
-rw-r--r--libview/ev-view.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 7ef1dd8..47fb438 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5454,13 +5454,16 @@ selection_free (EvViewSelection *selection)
static void
clear_selection (EvView *view)
{
- g_list_foreach (view->selection_info.selections, (GFunc)selection_free, NULL);
- g_list_free (view->selection_info.selections);
- view->selection_info.selections = NULL;
+ if (view->selection_info.selections) {
+ g_list_foreach (view->selection_info.selections, (GFunc)selection_free, NULL);
+ g_list_free (view->selection_info.selections);
+ view->selection_info.selections = NULL;
+
+ g_signal_emit (view, signals[SIGNAL_SELECTION_CHANGED], 0, NULL);
+ }
view->selection_info.in_selection = FALSE;
if (view->pixbuf_cache)
ev_pixbuf_cache_set_selection_list (view->pixbuf_cache, NULL);
- g_signal_emit (view, signals[SIGNAL_SELECTION_CHANGED], 0, NULL);
}
void