mirror of https://gitlab.com/basile.b/dexed.git
dont load docking in the OnFirstShow handler
This caused random cycles while auto-sizing, making dexed impossible to start without deleting docking.xml
This commit is contained in:
parent
390ec7777e
commit
7398bf9609
|
@ -457,6 +457,8 @@ type
|
|||
procedure updateFloatingWidgetOnTop(onTop: boolean);
|
||||
procedure widgetDockingChanged(sender: TDexedWidget; newState: TWidgetDockingState);
|
||||
procedure mnuOptsItemClick(sender: TObject);
|
||||
procedure anchorDockingAddControlEvent(Sender: TObject; aName: string;
|
||||
var AControl: TControl; DoDisableAutoSizing: boolean);
|
||||
|
||||
// IMainMenu
|
||||
function singleServiceName: string;
|
||||
|
@ -1356,6 +1358,10 @@ begin
|
|||
|
||||
fProcInputHandler := getprocInputHandler;
|
||||
|
||||
InitDocking;
|
||||
if FileExists(getDocPath + 'docking.xml') then
|
||||
LoadDocking();
|
||||
|
||||
fInitialized := true;
|
||||
end;
|
||||
|
||||
|
@ -1610,6 +1616,18 @@ begin
|
|||
fCleanIconIndex := loadIcon('CLEAN');
|
||||
end;
|
||||
|
||||
procedure TMainForm.anchorDockingAddControlEvent(Sender: TObject; aName: string;
|
||||
var AControl: TControl; DoDisableAutoSizing: boolean);
|
||||
var w : TDexedWidget;
|
||||
begin
|
||||
for w in fWidgList do
|
||||
if w.name = aName then
|
||||
begin
|
||||
AControl := w;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TMainForm.InitWidgets;
|
||||
var
|
||||
widg: TDexedWidget;
|
||||
|
@ -1617,6 +1635,9 @@ var
|
|||
itm: TMenuItem;
|
||||
idx: integer;
|
||||
begin
|
||||
|
||||
DockMaster.OnCreateControl := @anchorDockingAddControlEvent;
|
||||
|
||||
fWidgList := TWidgetList.Create;
|
||||
fMesgWidg := TMessagesWidget.create(self);
|
||||
fEditWidg := TEditorWidget.create(self);
|
||||
|
@ -2110,8 +2131,6 @@ var
|
|||
begin
|
||||
inherited;
|
||||
|
||||
InitDocking;
|
||||
|
||||
// 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
|
||||
if fAppliOpts.reloadLastDocuments then
|
||||
|
@ -2129,11 +2148,6 @@ begin
|
|||
fInfoWidg.showWidget;
|
||||
end;
|
||||
|
||||
// see https://bugs.freepascal.org/view.php?id=29475
|
||||
// reloading must be done here otherwise there are "jumps"
|
||||
if FileExists(getDocPath + 'docking.xml') then
|
||||
LoadDocking();
|
||||
|
||||
if fAppliOpts.autoCheckUpdates then
|
||||
begin
|
||||
url := checkForUpdate;
|
||||
|
|
Loading…
Reference in New Issue