mirror of https://gitlab.com/basile.b/dexed.git
use dedicated firstshow method
This commit is contained in:
parent
4764310182
commit
fb3a94166f
|
|
@ -263,7 +263,7 @@ type
|
||||||
|
|
||||||
protected
|
protected
|
||||||
|
|
||||||
procedure DoShow; override;
|
procedure DoFirstShow; override;
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
@ -309,7 +309,6 @@ type
|
||||||
fRunProjAfterCompile: boolean;
|
fRunProjAfterCompile: boolean;
|
||||||
fIsCompilingGroup: boolean;
|
fIsCompilingGroup: boolean;
|
||||||
fGroupCompilationCnt: integer;
|
fGroupCompilationCnt: integer;
|
||||||
fFirstShown: boolean;
|
|
||||||
fProjFromCommandLine: boolean;
|
fProjFromCommandLine: boolean;
|
||||||
fInitialized: boolean;
|
fInitialized: boolean;
|
||||||
fRunnableSw: string;
|
fRunnableSw: string;
|
||||||
|
|
@ -1485,39 +1484,33 @@ begin
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.DoShow;
|
procedure TCEMainForm.DoFirstShow;
|
||||||
var
|
var
|
||||||
url: string;
|
url: string;
|
||||||
begin
|
begin
|
||||||
inherited;
|
// TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc.
|
||||||
if (not fFirstShown) then
|
// see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm
|
||||||
begin
|
if fAppliOpts.reloadLastDocuments then
|
||||||
// TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc.
|
LoadLastDocsAndProj;
|
||||||
// see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm
|
if fProject = nil then
|
||||||
if fAppliOpts.reloadLastDocuments then
|
newNativeProj;
|
||||||
LoadLastDocsAndProj;
|
|
||||||
if fProject = nil then
|
|
||||||
newNativeProj;
|
|
||||||
|
|
||||||
DockMaster.ResetSplitters;
|
DockMaster.ResetSplitters;
|
||||||
|
|
||||||
if fFirstTimeCoedit then
|
|
||||||
actFileNewRun.Execute;
|
|
||||||
|
|
||||||
if fAppliOpts.autoCheckUpdates then
|
|
||||||
begin
|
|
||||||
url := checkForUpdate;
|
|
||||||
if url <> '' then
|
|
||||||
begin
|
|
||||||
if dlgYesNo('An new release is available, do you wish to visit the release page ?' +
|
|
||||||
lineEnding + '(' + url +')') = mrYes then
|
|
||||||
openUrl(url);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
fFirstShown := true;
|
|
||||||
end;
|
|
||||||
setSplitterWheelEvent;
|
setSplitterWheelEvent;
|
||||||
|
|
||||||
|
if fFirstTimeCoedit then
|
||||||
|
actFileNewRun.Execute;
|
||||||
|
|
||||||
|
if fAppliOpts.autoCheckUpdates then
|
||||||
|
begin
|
||||||
|
url := checkForUpdate;
|
||||||
|
if url <> '' then
|
||||||
|
begin
|
||||||
|
if dlgYesNo('An new release is available, do you wish to visit the release page ?' +
|
||||||
|
lineEnding + '(' + url +')') = mrYes then
|
||||||
|
openUrl(url);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
procedure TCEMainForm.FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue