Skip to content

Commit 2123372

Browse files
author
Joachim Marder
committed
* Removed dependency on unit "ActnMan" and so package "vclactband"
* We assign FRibbon also in the case "UIViewVerbCreate" of the OnViewChanged event. This should prevent a rare case where the ribbon settings could not be loaded properly because FRibbon was not assigned yet.
1 parent 26e0e70 commit 2123372

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

Lib/UIRibbon.pas

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ interface
2828
Controls,
2929
Classes,
3030
ActnList,
31-
ActnMan,
3231
UIRibbonApi,
3332
UIRibbonCommands;
3433

@@ -129,7 +128,7 @@ TUIRibbon = class(TWinControl, IUIApplication)
129128
/// </remarks>
130129
fApplicationModes: TRibbonApplicationModes;
131130
/// member variable for the property ActionManager
132-
fActionManager: TActionManager;
131+
fActionManager: TCustomActionList;
133132
/// Handles the recent items in the backstage menu of the ribbon bar
134133
fRecentItems: TUICommandRecentItems;
135134

@@ -442,7 +441,7 @@ TUIRibbon = class(TWinControl, IUIApplication)
442441
/// your application, e.g. like this:
443442
/// Self.RibbonActionManager := MyActionManager;
444443
/// </remarks>
445-
property ActionManager: TActionManager read fActionManager write fActionManager;
444+
property ActionManager: TCustomActionList read fActionManager write fActionManager;
446445

447446
{ The event that is fired when the Ribbon Framework creates a command. }
448447
property OnCommandCreate: TUIRibbomCommandEvent read FOnCommandCreate write FOnCommandCreate;
@@ -1086,8 +1085,10 @@ function TUIRibbon.OnViewChanged(ViewId: UInt32; TypeId: _UIViewType;
10861085
case Verb of
10871086
{ The view was newly created. }
10881087
UIViewVerbCreate:
1089-
Result := S_OK;
1090-
1088+
begin
1089+
FRibbon := View as IUIRibbon;
1090+
Result := S_OK;
1091+
end;
10911092
{ The view has been resized. For the Ribbon view, the application should
10921093
call GetHeight to determine the height of the ribbon. }
10931094
UIViewVerbSize:

0 commit comments

Comments
 (0)