From: Colin Clark Date: Sat, 6 May 2017 10:10:57 +0000 (+0100) Subject: Temporary Fix #467: Refresh doesn't preserve thumbnail viewpoint X-Git-Tag: v1.4~184 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=2d3cd230c26931eec9fc02f2f76d72f7bfe5e1c4 Temporary Fix #467: Refresh doesn't preserve thumbnail viewpoint https://github.com/BestImageViewer/geeqie/issues/467 The reason for the reset of the view is unknown. This patch hides the problem for the moment. --- diff --git a/src/view_file_icon.c b/src/view_file_icon.c index 579a1707..52e13e9c 100644 --- a/src/view_file_icon.c +++ b/src/view_file_icon.c @@ -1161,6 +1161,16 @@ static void vficon_set_focus(ViewFile *vf, IconData *id) { /* ensure focus row col are correct */ vficon_find_position(vf, VFICON(vf)->focus_id, &VFICON(vf)->focus_row, &VFICON(vf)->focus_column); +#if GTK_CHECK_VERSION(3,0,0) +/* FIXME: Refer to issue #467 on Github. The thumbnail position is not + * preserved when the icon view is refreshed. Caused by an unknown call from + * the idle loop. This patch hides the problem. + */ + if (vficon_find_iter(vf, VFICON(vf)->focus_id, &iter, NULL)) + { + tree_view_row_make_visible(GTK_TREE_VIEW(vf->listview), &iter, FALSE); + } +#endif return; } vficon_selection_remove(vf, VFICON(vf)->focus_id, SELECTION_FOCUS, NULL);