summaryrefslogtreecommitdiffstats
path: root/libraries/libfm/patches/0020-Fix-after-changing-the-folder-selection-isn-t-reset.patch
blob: cc3b422db5a7694fe09f37d54eda17a4fa094864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 7d31d56805d907bcb23f6b4c54719ac3b8f7a137 Mon Sep 17 00:00:00 2001
From: Andriy Grytsenko <andrej@rep.kiev.ua>
Date: Sat, 24 Nov 2012 17:31:48 +0200
Subject: [PATCH 20/22] Fix: after changing the folder selection isn't reset

This is reported in https://bugs.launchpad.net/ubuntu/+source/pcmanfm/+bug/1071231

After changing the folder selection is still stays cached
so pressing 'Delete' will trash the folder where we just came.
The commit adds cleanup on idle after model is changed.
---
 src/gtk/fm-standard-view.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gtk/fm-standard-view.c b/src/gtk/fm-standard-view.c
index 175cced..1ff55ae 100644
--- a/src/gtk/fm-standard-view.c
+++ b/src/gtk/fm-standard-view.c
@@ -275,6 +275,9 @@ static void unset_model(FmStandardView* fv)
         /* g_debug("unset_model: %p, n_ref = %d", model, G_OBJECT(model)->ref_count); */
         g_object_unref(model);
         fv->model = NULL;
+        /* https://bugs.launchpad.net/ubuntu/+source/pcmanfm/+bug/1071231:
+           after changing the folder selection isn't reset */
+        on_sel_changed(NULL, fv);
     }
 }
 
-- 
1.8.0.1