Przeglądaj źródła

FIX: Cannot focus a disabled or invisible window

Alexander Koblov 3 miesięcy temu
rodzic
commit
90222158e1
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/uquickviewpanel.pas

+ 1 - 1
src/uquickviewpanel.pas

@@ -160,7 +160,7 @@ begin
     FViewer.Show;
     FViewer.Show;
   end;
   end;
   // Viewer can steal focus, so restore it
   // Viewer can steal focus, so restore it
-  if Assigned(FLastFocusedControl) then
+  if Assigned(FLastFocusedControl) and FLastFocusedControl.CanSetFocus then
     FLastFocusedControl.SetFocus
     FLastFocusedControl.SetFocus
   else if not FFileView.Focused then
   else if not FFileView.Focused then
     FFileView.SetFocus;
     FFileView.SetFocus;