mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 02:09:17 +02:00
Merged revision(s) 54809 #25429f9352 from trunk:
MenuDesigner: Fixed adding a line separator at last position. Issue #31744 ........ git-svn-id: branches/fixes_1_8@54867 -
This commit is contained in:
parent
770d44fcaa
commit
010812080b
@ -1675,7 +1675,7 @@ procedure TShadowMenu.UpdateActionsEnabledness;
|
||||
var
|
||||
ac, ac1, ac2, ac3: TAction;
|
||||
pe: TPopEnum;
|
||||
isInBar, isFirst, isLast, prevIsSeparator, nextIsSeparator,
|
||||
isInBar, isFirst, isSeparator, isLast, prevIsSeparator, nextIsSeparator,
|
||||
levelZero, levelZeroOr1, primarySCEnabled: boolean;
|
||||
begin
|
||||
if (FSelectedMenuItem = nil) then
|
||||
@ -1683,6 +1683,7 @@ begin
|
||||
isInBar:=FSelectedMenuItem.IsInMenuBar;
|
||||
isFirst:=(FSelectedMenuItem.MenuIndex = 0);
|
||||
isLast:=(FSelectedMenuItem.MenuIndex = Pred(FSelectedMenuItem.Parent.Count));
|
||||
isSeparator:=FSelectedMenuItem.IsLine;
|
||||
prevIsSeparator:=PreviousItemIsSeparator(FSelectedMenuItem);
|
||||
nextIsSeparator:=NextItemIsSeparator(FSelectedMenuItem);
|
||||
levelZero:=(FSelectedMenuItem.Parent <> nil) and (FSelectedMenuItem.Parent.Parent = nil);
|
||||
@ -1763,9 +1764,9 @@ begin
|
||||
//popItemSep
|
||||
popSeparators_: ac.Enabled:=primarySCEnabled;
|
||||
popAddSeparatorBefore:
|
||||
ac.Enabled:=primarySCEnabled and not isFirst and not prevIsSeparator;
|
||||
ac.Enabled:=primarySCEnabled and not isSeparator and not isFirst and not prevIsSeparator;
|
||||
popAddSeparatorAfter:
|
||||
ac.Enabled:=primarySCEnabled and not isLast and not nextIsSeparator;
|
||||
ac.Enabled:=not isInBar and not isSeparator and not nextIsSeparator;
|
||||
popRemoveAllSeparators:
|
||||
ac.Enabled:=primarySCEnabled and (GetChildSeparatorCount(FSelectedMenuItem.Parent) > 0);
|
||||
//popShortcuts_
|
||||
|
Loading…
Reference in New Issue
Block a user