SpkToolbar: Fire OnMenuButtonClick only when a MenuButtonDropDown popup menu is assigned to the SpkToolbar. Issue #38481.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7969 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2021-02-15 15:00:44 +00:00
parent 79c276f94d
commit 4e0089b2f2

View File

@ -2579,13 +2579,13 @@ begin
SetMetricsInvalid;
Repaint;
// Dropdown the Menu button dropdown menu and fire the event for click
// Dropdown the Menu button dropdown menu or fire the event for click
if Assigned(FMenuButtonDropdownMenu) and (FShowMenuButton) then
begin
aPopupPoint := ClientToScreen(GetMenuButtonDropdownPoint);
TPopupMenu(FMenuButtonDropdownMenu).PopUp(aPopupPoint.X, aPopupPoint.Y);
DoMenuButtonClick;
end;
end else
DoMenuButtonClick;
end;
// Support for Menu Button click