diff --git a/QuickLook/ViewerWindow.xaml.cs b/QuickLook/ViewerWindow.xaml.cs index 7eb190af7..a7586fd8b 100644 --- a/QuickLook/ViewerWindow.xaml.cs +++ b/QuickLook/ViewerWindow.xaml.cs @@ -1,4 +1,4 @@ -// Copyright © 2017-2026 QL-Win Contributors +// Copyright © 2017-2026 QL-Win Contributors // // This file is part of QuickLook program. // @@ -134,7 +134,14 @@ internal ViewerWindow() WindowState = WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; buttonShare.Click += (_, _) => ShareHelper.Share(_path, this); - buttonOpenWith.Click += (_, _) => ShareHelper.Share(_path, this, true); + buttonOpenWith.Click += (_, _) => + { + ShareHelper.Share(_path, this, true); + if (Pinned) + Close(); + else + ViewWindowManager.GetInstance().ClosePreview(); + }; buttonReload.Visibility = SettingHelper.Get("ShowReload", false) ? Visibility.Visible : Visibility.Collapsed;