mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 23:20:18 +02:00
IDE: fixed editor crash in multi window mode (context menu).patch from Juha, debugging from me. fixes #17321
git-svn-id: trunk@27252 -
This commit is contained in:
parent
41cba2bb5e
commit
4f5b4d81da
@ -990,9 +990,15 @@ var
|
||||
{$IFDEF VerboseMenuIntf}
|
||||
debugln('TIDEMenuSection.UpdateNeedTopSeparator CREATE TopSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count));
|
||||
{$ENDIF}
|
||||
if ContainerMenuIndex>ContainerMenuItem.Count then begin
|
||||
if ContainerMenuIndex>ContainerMenuItem.Count then
|
||||
begin
|
||||
debugln('TIDEMenuSection.UpdateNeedTopSeparator CREATE TopSeparator Name="',Name,'" ContainerMenuIndex=',dbgs(ContainerMenuIndex),' ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count));
|
||||
GetRoot.WriteDebugReport(' Top ',true);
|
||||
{$IFDEF VerboseMenuIntf}
|
||||
debugln('TIDEMenuSection.UpdateNeedTopSeparator CREATE TopSeparator Name="',Name,'" ContainerMenuIndex ** FORCED VALUE ** FROM ContainerMenuItem.Count=',dbgs(ContainerMenuItem.Count));
|
||||
{$ENDIF}
|
||||
// there's no yet available room for new FTopSeparator.fixes #17321.
|
||||
ContainerMenuIndex := ContainerMenuItem.Count;
|
||||
end;
|
||||
ContainerMenuItem.Insert(ContainerMenuIndex,FTopSeparator);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user