[Lazarus] Desktops and multiple source editors

Martin Frb lazarus at mfriebe.de
Wed Sep 9 13:27:32 CEST 2015

On 09/09/2015 11:58, Juha Manninen wrote:
> Martin Friebe noticed a problem with desktops and multiple source
> editor windows.
> In fact I also noticed that a second source editor is not restored
> correctly when changing desktops.
> Now I realized the 2nd, 3rd etc. editor windows are project specific,
> while other layout settings are global. This is not very logical. How
> to solve it?
> I think all layout settings should be global for the sake of consistency.

IMHO global is ok. Maybe an option to add project specific layouts?

In any case SourceEditors. The layout should store the positions and 
sizes. The project defines which of them to use.
But that needs decision what to do, if a layout was created with 2 
editors, but a project has 3 open. Where to get the initial pos for the 
new source editor?
- default pos
- pos from global "default" layout  (if it specifies such a pos)
- pos from hidden layout "last pos of any window by name"
- have a parent mode (layout was created as "child" of other mode)
- search the mast similar one (probably not)

Also does it affect design forms? Then that would have similar issues....

position of open package windows...
At first similar to the source edit issue, only projects are more likely 
to have different packages.
[pos from hidden layout "last pos of any window by name"] might help here.

More information about the Lazarus mailing list