mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-14 12:59:15 +02:00
SourceEditor: Fix "move to other Window" menu, work with SynDualView
git-svn-id: trunk@24439 -
This commit is contained in:
parent
3b3bb0a448
commit
4df6b8b4c4
@ -4903,20 +4903,24 @@ begin
|
||||
end;
|
||||
|
||||
{$IFnDEF SingleSrcWindow}
|
||||
SrcEditMenuMoveToNewWindow.Visible := Manager.SourceWindowCount <= 1;
|
||||
SrcEditMenuMoveToNewWindow.Enabled := PageCount > 1;
|
||||
SrcEditMenuMoveToOtherWindow.Visible := Manager.SourceWindowCount > 1;
|
||||
SrcEditMenuMoveToOtherWindowNew.Enabled := (PageCount > 1);
|
||||
SrcEditMenuMoveToOtherWindowList.Clear;
|
||||
NBAvail := False;
|
||||
for i := 0 to Manager.SourceWindowCount - 1 do
|
||||
if i <> Manager.IndexOfSourceWindow(self) then begin
|
||||
if (i <> Manager.IndexOfSourceWindow(self)) and
|
||||
(Manager.SourceWindows[i].IndexOfEditorInShareWith(GetActiveSE) < 0)
|
||||
then begin
|
||||
NBAvail := True;
|
||||
with RegisterIDEMenuCommand(SrcEditMenuMoveToOtherWindowList,
|
||||
'CopyToWindow'+IntToStr(i),
|
||||
'MoveToWindow'+IntToStr(i),
|
||||
Manager.SourceWindows[i].Caption,
|
||||
@SrcEditMenuMoveToExistingWindowClicked)
|
||||
do
|
||||
Tag := i;
|
||||
end;
|
||||
SrcEditMenuMoveToNewWindow.Visible := not NBAvail;
|
||||
SrcEditMenuMoveToNewWindow.Enabled := PageCount > 1;
|
||||
SrcEditMenuMoveToOtherWindow.Visible := NBAvail;
|
||||
SrcEditMenuMoveToOtherWindowNew.Enabled := (PageCount > 1);
|
||||
{$ENDIF}
|
||||
{$IFDEF SynDualView}
|
||||
NBAvail := False;
|
||||
|
Loading…
Reference in New Issue
Block a user