From 8fb2189446ebc3a93896e8425ade7b8f838988e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Thu, 25 May 2023 10:37:08 +0200 Subject: [PATCH] FileView: Prevent a possible infinite refresh and preview recursion when some properties are read during the 'Refresh' event. [GB.FORM] * BUG: FileView: Prevent a possible infinite refresh and preview recursion when some properties are read during the 'Refresh' event. --- comp/src/gb.form/.project | 2 +- comp/src/gb.form/.src/File/FileView.class | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/comp/src/gb.form/.project b/comp/src/gb.form/.project index 00035d26e..fb7d9ecc9 100644 --- a/comp/src/gb.form/.project +++ b/comp/src/gb.form/.project @@ -1,6 +1,6 @@ # Gambas Project File 3.0 Title=More controls for graphical components -Startup=FTestColorChooser +Startup=FTestFileChooser Icon=.hidden/icon.png Version=3.18.90 VersionFile=1 diff --git a/comp/src/gb.form/.src/File/FileView.class b/comp/src/gb.form/.src/File/FileView.class index 2095e2b17..218759ae7 100644 --- a/comp/src/gb.form/.src/File/FileView.class +++ b/comp/src/gb.form/.src/File/FileView.class @@ -747,7 +747,7 @@ End Public Sub Refresh_Timer() - If Not $bRefreshTriggered And Not $hRefresh.Enabled Then Return + If Not $bRefreshTriggered And If Not $hRefresh.Enabled Then Return RefreshView $hRefresh.Stop @@ -829,7 +829,7 @@ End Private Sub EnsureRefresh() Try $hRefresh.Stop - RefreshView + If $bRefreshTriggered Then RefreshView End