Fix #162: switch preview when calling from command-line

This commit is contained in:
Paddy Xu
2018-01-20 16:42:07 +02:00
parent 2ba3fcdf6e
commit 5c02a8c9cf
6 changed files with 14 additions and 6 deletions
+3 -1
View File
@@ -75,7 +75,7 @@ namespace QuickLook
public void TogglePreview(string path)
{
if (_viewerWindow.Visibility == Visibility.Visible)
if (_viewerWindow.Visibility == Visibility.Visible && path == _invokedPath)
ClosePreview();
else
InvokePreview(path);
@@ -95,6 +95,8 @@ namespace QuickLook
{
StopFocusMonitor();
_viewerWindow.Pinned = true;
var newWindow = new ViewerWindow
{
Top = _viewerWindow.Top,