View Issue Details

IDProjectCategoryView StatusLast Update
0001603Double CommanderGraphical user interfacepublic2020-11-30 07:43
Reportercordylus Assigned ToAlexx2000  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
ProjectionnoneETAnone 
Product Version0.7.6 
Target Version0.8.0Fixed in Version0.8.0 
Summary0001603: Clicking on search result should bring main window to front
DescriptionЕсли переключился на другое окно, пока шел поиск, а потом вернулся, при клике по результату окно поиска закрывается, но общее окно не открывается, если оно осталось где-то позади других окон, а переключается на последнее активное окно другой программы.
TagsNo tags attached.
Attached Files
bug1603.patch (1,653 bytes)   
Index: src/fFindDlg.pas
===================================================================
--- src/fFindDlg.pas	(revision 7565)
+++ src/fFindDlg.pas	(working copy)
@@ -1594,6 +1594,7 @@
         SetFileSystemPath(frmMain.ActiveFrame, ExtractFilePath(lsFoundedFiles.Items[lsFoundedFiles.ItemIndex]));
         frmMain.ActiveFrame.SetActiveFile(ExtractFileName(lsFoundedFiles.Items[lsFoundedFiles.ItemIndex]));
       end;
+      frmMain.RestoreWindow;
       Close;
     except
       on E: Exception do MessageDlg(E.Message, mtError, [mbOK], 0);
Index: src/fmain.pas
===================================================================
--- src/fmain.pas	(revision 7565)
+++ src/fmain.pas	(working copy)
@@ -809,6 +809,7 @@
     procedure ToggleConsole;
     procedure UpdateWindowView;
     procedure MinimizeWindow;
+    procedure RestoreWindow;
     procedure LoadTabs;
     procedure LoadTabsCommandLine(Params: TCommandLineParams);
     procedure LoadWindowState;
@@ -5057,16 +5058,8 @@
 
 procedure TfrmMain.OnUniqueInstanceMessage(Sender: TObject; Params: TCommandLineParams);
 begin
-  if HiddenToTray then
-    RestoreFromTray
-  else
-  begin
-    WindowState:= lastWindowState;
-    BringToFront;
-  end;
-
+  RestoreWindow;
   LoadTabsCommandLine(Params);
-
 end;
 
 procedure TfrmMain.tbPasteClick(Sender: TObject);
@@ -5312,6 +5305,17 @@
 end;
 //LaBero end
 
+procedure TfrmMain.RestoreWindow;
+begin
+  if HiddenToTray then
+    RestoreFromTray
+  else
+  begin
+    WindowState:= lastWindowState;
+    BringToFront;
+  end;
+end;
+
 procedure TfrmMain.LoadTabs;
 begin
   LoadTabsXml(gConfig,'Tabs/OpenedTabs/Left', nbLeft);
bug1603.patch (1,653 bytes)   
Fixed in Revision7568
Operating systemWindows
Widgetset
Architecture

Activities

cordylus

2017-05-16 10:06

developer   ~0002229

Прикрепил патч. Новую функцию можно взять за основу cm_Restore.

Issue History

Date Modified Username Field Change
2016-11-07 10:40 cordylus New Issue
2017-05-16 09:59 cordylus File Added: bug1603.patch
2017-05-16 10:06 cordylus Note Added: 0002229
2017-05-16 12:43 Alexx2000 Status new => acknowledged
2017-05-16 12:43 Alexx2000 Target Version => 0.8.0
2017-05-17 22:50 Alexx2000 Fixed in Revision => 7568
2017-05-17 22:50 Alexx2000 Status acknowledged => resolved
2017-05-17 22:50 Alexx2000 Fixed in Version => 0.8.0
2017-05-17 22:50 Alexx2000 Resolution open => fixed
2017-05-17 22:50 Alexx2000 Assigned To => Alexx2000
2020-11-30 07:43 Alexx2000 Status resolved => closed