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);