mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-25 02:00:12 +08:00
Fix crash when switching preview while maximized
This commit is contained in:
@@ -90,6 +90,10 @@ namespace QuickLook
|
||||
return;
|
||||
}
|
||||
|
||||
// is the window is now now maximized, do not move it
|
||||
if (WindowState == WindowState.Maximized)
|
||||
return;
|
||||
|
||||
// if this is a new window, place it to top
|
||||
if (Visibility != Visibility.Visible)
|
||||
this.BringToFront();
|
||||
@@ -145,7 +149,8 @@ namespace QuickLook
|
||||
|
||||
ResizeAndCenter(new Size(newWidth, newHeight));
|
||||
|
||||
Show();
|
||||
if (Visibility != Visibility.Visible)
|
||||
Show();
|
||||
|
||||
//WindowHelper.SetActivate(new WindowInteropHelper(this), ContextObject.CanFocus);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user