From 61520ab7ec329d47a1be24a5b93ad025ef3a4658 Mon Sep 17 00:00:00 2001 From: Ludovic LEROUGE - TheRed Games Date: Mon, 4 Mar 2024 13:44:09 +0100 Subject: [PATCH] fix: Simplify ShowWindow to display and refresh Image Display --- package/Editor/Images/Images.cs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/package/Editor/Images/Images.cs b/package/Editor/Images/Images.cs index 5e64bde..5b3876d 100644 --- a/package/Editor/Images/Images.cs +++ b/package/Editor/Images/Images.cs @@ -23,19 +23,15 @@ public class Images : EditorWindow [MenuItem("Window/Scenario/Images")] public static void ShowWindow() { - if (isVisible) - { - GetInferencesData(); - } - else + if (!isVisible) { lastPageToken = string.Empty; imageDataList.Clear(); - GetInferencesData(); - - var images = (Images)GetWindow(typeof(Images)); - ImagesUI.Init(images); } + GetInferencesData(); + + var images = (Images)GetWindow(typeof(Images)); + ImagesUI.Init(images); } private void OnGUI()