From 8549f24d0ac77bb47fb5fd9779e2ee44e86b5d29 Mon Sep 17 00:00:00 2001 From: Paddy Xu Date: Mon, 23 Sep 2019 20:26:27 +0300 Subject: [PATCH] Fix #521 again: the same for arrow keys --- QuickLook/ViewWindowManager.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/QuickLook/ViewWindowManager.cs b/QuickLook/ViewWindowManager.cs index 0c89e3d..6e9f463 100644 --- a/QuickLook/ViewWindowManager.cs +++ b/QuickLook/ViewWindowManager.cs @@ -107,15 +107,15 @@ namespace QuickLook public void SwitchPreview(string path = null) { + if (_viewerWindow.Visibility != Visibility.Visible) + return; + if (string.IsNullOrEmpty(path)) path = NativeMethods.QuickLook.GetCurrentSelection(); if (string.IsNullOrEmpty(path)) return; - if (_viewerWindow.Visibility != Visibility.Visible) - return; - InvokePreview(path); }