[geany/geany-plugins] 4144a7: TreeBrowser: fix refreshing without selection (#525)

Vasiliy Faronov git-noreply at xxxxx
Wed Feb 15 22:22:37 UTC 2017


Branch:      refs/heads/master
Author:      Vasiliy Faronov <vfaronov at gmail.com>
Committer:   Frank Lanitz <frank at frank.uvena.de>
Date:        Wed, 15 Feb 2017 22:22:37 UTC
Commit:      4144a719be86a708c5741812e26f1d128227539f
             https://github.com/geany/geany-plugins/commit/4144a719be86a708c5741812e26f1d128227539f

Log Message:
-----------
TreeBrowser: fix refreshing without selection (#525)

This fixes a bug that could be reproduced as follows:

1. ensure that *no* item in the tree is selected (highlighted);
2. press the "Refresh" keybinding.

Without this fix, the contents of the tree are duplicated.


Modified Paths:
--------------
    treebrowser/src/treebrowser.c

Modified: treebrowser/src/treebrowser.c
3 lines changed, 2 insertions(+), 1 deletions(-)
===================================================================
@@ -461,7 +461,6 @@ treebrowser_chroot(const gchar *dir)
 
 	treebrowser_bookmarks_set_state();
 
-	gtk_tree_store_clear(treestore);
 	setptr(addressbar_last_address, directory);
 
 	treebrowser_browse(addressbar_last_address, NULL);
@@ -499,6 +498,8 @@ treebrowser_browse(gchar *directory, gpointer parent)
 
 	if (parent)
 		gtk_tree_store_iter_clear_nodes(parent, FALSE);
+	else
+		gtk_tree_store_clear(treestore);
 
 	list = utils_get_file_list(directory, NULL, NULL);
 	if (list != NULL)



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Plugins-Commits mailing list