X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=blobdiff_plain;f=src%2Fview_dir_tree.c;h=7a5feea122ca4585221dab2f9cc7e072ba58689e;hp=88b78c45a59853d6ca1a5cf6955a2d8e201191d4;hb=db38d12f83128e9890ce2d2c7acc5ad62062bc7e;hpb=e436ea53511e1dadab981af18b237fee83fde39b diff --git a/src/view_dir_tree.c b/src/view_dir_tree.c index 88b78c45..7a5feea1 100644 --- a/src/view_dir_tree.c +++ b/src/view_dir_tree.c @@ -694,12 +694,12 @@ gboolean vdtree_set_fd(ViewDir *vd, FileData *dir_fd) gtk_tree_view_get_cursor(GTK_TREE_VIEW(vd->view), &old_tpath, NULL); tpath = gtk_tree_model_get_path(store, &iter); - + if (!old_tpath || gtk_tree_path_compare(tpath, old_tpath) != 0) { /* setting the cursor scrolls the view; do not do that unless it is necessary */ gtk_tree_view_set_cursor(GTK_TREE_VIEW(vd->view), tpath, NULL, FALSE); - + /* gtk_tree_view_set_cursor scrolls the window itself, but it sometimes does not work (switch from dir_list to dir_tree) */ tree_view_row_make_visible(GTK_TREE_VIEW(vd->view), &iter, TRUE);