From 4e0089b2f2e21711b0aef907207afa166b864f14 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Mon, 15 Feb 2021 15:00:44 +0000 Subject: [PATCH] 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 --- components/spktoolbar/SpkToolbar/SpkToolbar.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/spktoolbar/SpkToolbar/SpkToolbar.pas b/components/spktoolbar/SpkToolbar/SpkToolbar.pas index c2350c758..bfb1e1881 100644 --- a/components/spktoolbar/SpkToolbar/SpkToolbar.pas +++ b/components/spktoolbar/SpkToolbar/SpkToolbar.pas @@ -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