mirror of https://gitlab.com/basile.b/dexed.git
derefer docking init to fix slow startup
This commit is contained in:
parent
70b3a1091e
commit
cc43af01e1
|
@ -387,6 +387,7 @@ type
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
fDockingIsInitialized: boolean;
|
||||||
fGitIconIndex: integer;
|
fGitIconIndex: integer;
|
||||||
fImages: TImageList;
|
fImages: TImageList;
|
||||||
fOptionCategories: TEditableOptionsSubject;
|
fOptionCategories: TEditableOptionsSubject;
|
||||||
|
@ -1281,7 +1282,6 @@ begin
|
||||||
InitImages;
|
InitImages;
|
||||||
InitMRUs;
|
InitMRUs;
|
||||||
InitWidgets;
|
InitWidgets;
|
||||||
InitDocking;
|
|
||||||
LoadSettings;
|
LoadSettings;
|
||||||
layoutUpdateMenu;
|
layoutUpdateMenu;
|
||||||
fMultidoc := getMultiDocHandler;
|
fMultidoc := getMultiDocHandler;
|
||||||
|
@ -1698,6 +1698,8 @@ var
|
||||||
h: TAnchorDockHostSite;
|
h: TAnchorDockHostSite;
|
||||||
begin
|
begin
|
||||||
|
|
||||||
|
fDockingIsInitialized := true;
|
||||||
|
|
||||||
if not reset then
|
if not reset then
|
||||||
begin
|
begin
|
||||||
DockMaster.MakeDockSite(Self, [akBottom], admrpChild);
|
DockMaster.MakeDockSite(Self, [akBottom], admrpChild);
|
||||||
|
@ -2090,6 +2092,9 @@ var
|
||||||
url: string;
|
url: string;
|
||||||
begin
|
begin
|
||||||
inherited;
|
inherited;
|
||||||
|
|
||||||
|
InitDocking;
|
||||||
|
|
||||||
// TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc.
|
// TODO-cbetterfix: clipboard doesn't work first time it's used on a reloaded doc.
|
||||||
// see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm
|
// see: http://forum.lazarus.freepascal.org/index.php/topic,30616.0.htm
|
||||||
if fAppliOpts.reloadLastDocuments then
|
if fAppliOpts.reloadLastDocuments then
|
||||||
|
@ -3734,8 +3739,14 @@ procedure TMainForm.snapTopSplitterToMenu;
|
||||||
var
|
var
|
||||||
topsplt: TAnchorDockSplitter;
|
topsplt: TAnchorDockSplitter;
|
||||||
topsite: TControl;
|
topsite: TControl;
|
||||||
|
edtSite: TControl;
|
||||||
begin
|
begin
|
||||||
if GetDockSplitterOrParent(DockMaster.GetSite(fEditWidg), akTop, topsite) then
|
if not fDockingIsInitialized then
|
||||||
|
exit;
|
||||||
|
edtSite := DockMaster.GetSite(fEditWidg);
|
||||||
|
if edtSite.isNil then
|
||||||
|
exit;
|
||||||
|
if GetDockSplitterOrParent(edtSite, akTop, topsite) then
|
||||||
begin
|
begin
|
||||||
if topsite is TAnchorDockHostSite and
|
if topsite is TAnchorDockHostSite and
|
||||||
TAnchorDockHostSite(topsite).BoundSplitter.isNotNil and
|
TAnchorDockHostSite(topsite).BoundSplitter.isNotNil and
|
||||||
|
|
Loading…
Reference in New Issue