View Issue Details

IDProjectCategoryView StatusLast Update
0031981LazarusPackagespublic2017-08-21 13:21
ReporterMichl Assigned ToMichl  
Status closedResolutionfixed 
Product Version1.9 (SVN) 
Target Version1.8 
Summary0031981: AnchorDockingDsgn doesn't initially respect IDE Coolbar settings
DescriptionIf you install package AnchorDockingDsgn, the present Coolbar Settings get lost and the IDE Coolbar isn't visible anymore.

TagsNo tags attached.
Fixed in Revisionr55269, r55277
Attached Files


related to 0029863 resolvedOndrej Pokorny Packages [regression] Anchordocking doesn't work in Lazarus 1.6 but works in Lazarus 1.4.4 
related to 0029200 assignedMattias Gaertner Lazarus Desktop manager restore incorrect docked layouts when layout has docked pages 
related to 0032166 closedMichl Lazarus Regression: Revision 55424 breaks loading of undocked desktop settings for initial AnchorDockingDsgn 
related to 0032167 closedMichl Lazarus Regression: Revision 55424 breaks loading default undocked desktop after removing AnchorDockingDsgn 


Ondrej Pokorny

2017-06-09 00:21

developer   ~0100956

Huh, you were fast :) Very good.

I just don't like you use the hard coded 'default' desktop - IMO you should initially test the last active desktop - FActiveDesktopName. Please consider the attached patch. (It's only a small correction, all kudos go to you :) )

Ondrej Pokorny

2017-06-09 00:22


defdesktop-1.patch (1,433 bytes)   
Index: ide/environmentopts.pp
--- ide/environmentopts.pp	(revision 55269)
+++ ide/environmentopts.pp	(working copy)
@@ -2683,7 +2683,8 @@
-  DefaultDesktop: TDesktopOpt;
+  OldActiveDesktop: TDesktopOpt;
+  OldActiveDesktopName: string;
   if FActiveDesktopName <> '' then
@@ -2695,6 +2696,7 @@
   //the selected desktop is unsupported (docked/undocked)
   // -> use default
+  OldActiveDesktopName := FActiveDesktopName;
   Result := FDesktops.Find(FActiveDesktopName);
   if Assigned(Result) and Result.Compatible then
@@ -2703,7 +2705,6 @@
   //recreate desktop with ActiveDesktopName
   if Assigned(Result) then
-  DefaultDesktop := FDesktops.Find('default');
   Result := TDesktopOpt.Create(FActiveDesktopName);
@@ -2710,8 +2711,11 @@
   if Assigned(IDEDockMaster) then
-  if Assigned(DefaultDesktop) then
-    Result.Assign(DefaultDesktop, False, False);
+  OldActiveDesktop := FDesktops.Find(OldActiveDesktopName);
+  if not Assigned(OldActiveDesktop) then
+    OldActiveDesktop := FDesktops.Find('default');
+  if Assigned(OldActiveDesktop) then
+    Result.Assign(OldActiveDesktop, False, False);
 procedure TEnvironmentOptions.SetTestBuildDirectory(const AValue: string);
defdesktop-1.patch (1,433 bytes)   

Ondrej Pokorny

2017-06-09 13:24

developer   ~0100968

I applied the patch because I changed the desktop code :)


2017-06-09 20:00

developer   ~0100980

Thank you!

Joe care

2017-06-21 07:11

reporter   ~0101237

please reopen,
Now when you switch from Docked-Layout-Setting to Non-docked-layout setting _ALL_
desktop-Data is reset to a default version, (including the IDE-Coolbar)
And also vice versa, when switching non Docked to docked all Settings incl. all saved (AD) Desktops are gone (because going to no-AD kicks them) and a default layout is generated and used.


2017-06-21 09:00

developer   ~0101238

As written in the forum:

In my point of view it is working correct:

If you make changes in a undocked (default) IDE in the settings, these settings are taken to a initially docked desktop after installing package AnchorDockedDsgn. You can now make changes in this new created (default docked) desktop. The last unused (default) desktop isn't deleted and not changed (see Mainmenu -> Tools -> Desktops ...).

If you now uninstall package AnchorDockedDsgn, the previous default desktop is loaded again. The docked desktops are deleted and this is correct, as they come with the package AnchorDockedDsgn (all things that a package installs have to be removed, if the package is uninstalled).

If you later want to reuse docked settings, you have do export and import these docked desktops. Of course this is not working now (0029200). So the current workaround is to make a copy of your environmentoptions.xml and use it after reinstalling AnchorDockedDsgn, don't uninstall that package or adapt your divergent settings from your default desktop after package reinstalling.

Ondrej Pokorny

2017-06-21 15:29

developer   ~0101247

Unfortunately, currently there is no chance to preserve the docked desktops when AnchorDocking is not installed. It's because AnchorDocking directly saves the desktops. If it is not installed, Lazarus has no idea how to save them.

Issue History

Date Modified Username Field Change
2017-06-08 20:31 Michl New Issue
2017-06-08 20:31 Michl Status new => assigned
2017-06-08 20:31 Michl Assigned To => Michl
2017-06-08 20:32 Michl Relationship added related to 0029863
2017-06-08 23:39 Michl Fixed in Revision => r55269
2017-06-08 23:39 Michl Status assigned => resolved
2017-06-08 23:39 Michl Resolution open => fixed
2017-06-09 00:21 Ondrej Pokorny Note Added: 0100956
2017-06-09 00:21 Ondrej Pokorny Status resolved => assigned
2017-06-09 00:21 Ondrej Pokorny Resolution fixed => reopened
2017-06-09 00:22 Ondrej Pokorny File Added: defdesktop-1.patch
2017-06-09 13:24 Ondrej Pokorny Fixed in Revision r55269 => r55269, r55277
2017-06-09 13:24 Ondrej Pokorny Note Added: 0100968
2017-06-09 13:24 Ondrej Pokorny Status assigned => resolved
2017-06-09 13:24 Ondrej Pokorny Resolution reopened => fixed
2017-06-09 20:00 Michl Note Added: 0100980
2017-06-21 07:11 Joe care Note Added: 0101237
2017-06-21 09:00 Michl Note Added: 0101238
2017-06-21 11:27 Juha Manninen Relationship added related to 0029200
2017-06-21 15:29 Ondrej Pokorny Note Added: 0101247
2017-07-19 11:46 Michl Relationship added related to 0032166
2017-07-19 11:50 Michl Relationship added related to 0032167
2017-08-21 13:21 Michl Status resolved => closed