TAdvCustomToolBar.UpdateMenu can not remove menu items

Hello,

we are using VCL UI Pack 10.5.7.1. I've already walked through the change history of latest versions, but the behaviour described below hasn't been addressed yet, it seems.

I have a MyMainMenu: TAdvMainMenu that is populated and placed on a MyMainToolBar: TAdvToolBar during design-time. During run-time, I'd like to remove a distinct top level menu item (referenced in let's say MyMenuItem). So I call MyMainMenu.Items.Remove(MyMenuItem) and MyMainToolBar.UpdateMenu, afterwards.

But: UpdateMenu, as it is implemented in 10.5.7.1, isn't able to recognize that items have been removed from the referenced menu (FMenu) and thus it doesn't realize that the menu has to be reassigned.

I think there should be another check, before comparing the two collections one-on-one:
ReAssignMenu := (FMenu.Items.Count <> FATBControls.Count);

If this validates True already, then the item-wise comparison could be skipped and the reassignment could be executed straight away, I think.

Thank you and cheers,
Thorsten

Thanks for reporting.
We applied an improvement to address this.