<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 09.09.2015 17:16, Ondrej Pokorny
wrote:<br>
</div>
<blockquote cite="mid:55F04D51.1030606@kluug.net" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
<div class="moz-cite-prefix">On 09.09.2015 12:58, Juha Manninen
wrote:<br>
</div>
<blockquote
cite="mid:CAPN1EhC1sKPGGyWaT=2mcUr+5vXGhDttc0ykRXy+_n+xWroxcg@mail.gmail.com"
type="cite">
<pre wrap="">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.
Juha
</pre>
</blockquote>
<br>
The settings are saved correctly in the environment settings. Try
to save a desktop with 2 editor windows, move something (including
the editor windows) and then load the desktop. Both editor windows
are positioned correctly.<br>
<br>
Actually, from the principal point of view, the code is correct.
Editor windows are normal nonmodal windows and so they are
restored/closed on desktop change like any other window. If you
stored a desktop without a secondary editor window, it is closed
when you apply the desktop.<br>
<br>
But I see that this is not wanted and expected from the user's
point of view -><br>
That means secondary editor windows need special treatment in <b>TEnvironmentOptions.UseDesktop/TIDEWindowCreatorList.RestoreSimpleLayout</b>.
It should not change visibility of editor windows. It should only
change their position.<br>
<br>
I fixed this in the undocked environment. See the patch. Please
test/comment. The special windows that should not be closed/shown
on desktop change have to be registered in the <b>IDEWindowsDontChangeVisibility</b>
list (names of the forms). Currently only editor windows are added
into the list.<br>
Important: if you save a desktop with a secondary editor and use
it, the position of the secondary editor is restored. If you save
a desktop with no secondary editors and you apply the desktop when
there is a secondary editor window visible, it won't change its
position. This is correct behavior.<br>
<br>
+ Please don't report bugs like "I created a desktop with no
editor window. But when I apply it, the editor window isn't
closed." This is the requested behavior now (there is no
difference between secondary/primary editor window).<br>
<br>
Ondrej<br>
</blockquote>
+ Maybe package windows should be treated the same way as editor
windows? They are closed/opened on desktop change as well (the same
problem).<br>
<br>
Ondrej <br>
</body>
</html>