changeset 2476:095c1ada9ddf

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.
author Colin Clark <colin.clark@cclark.uk>
date Sat, 06 May 2017 11:10:57 +0100
parents 53faa92f790f
children 9e65967e9af0
files src/view_file_icon.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/view_file_icon.c	Thu May 04 19:06:48 2017 +0100
+++ b/src/view_file_icon.c	Sat May 06 11:10:57 2017 +0100
@@ -1161,6 +1161,16 @@
 			{
 			/* 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);