From c26c1c703f319534f275d95fb18a2c5c5862bcf0 Mon Sep 17 00:00:00 2001 From: gambas Date: Fri, 23 Feb 2018 04:06:27 +0100 Subject: [PATCH] MenuButton: Do not popup a sibling MenuButton if the current one has been closed. [GB.FORM] * BUG: MenuButton: Do not popup a sibling MenuButton if the current one has been closed. --- comp/src/gb.form/.src/Button/MenuButton.class | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/comp/src/gb.form/.src/Button/MenuButton.class b/comp/src/gb.form/.src/Button/MenuButton.class index 198c889df..fa93f0fe4 100644 --- a/comp/src/gb.form/.src/Button/MenuButton.class +++ b/comp/src/gb.form/.src/Button/MenuButton.class @@ -139,9 +139,15 @@ Public Sub WatchTimer_Timer() Dim X As Integer Dim Y As Integer + If Not $hCurrentMenu Or If $hCurrentMenu.Closed Then + Last.Stop + Return + Endif + X = Mouse.ScreenX - Me.Parent.ScreenX Y = Mouse.ScreenY - Me.Parent.ScreenY + 'Debug X;; Y If X < 0 Or If Y < 0 Or If X >= Me.Parent.W Or If Y >= Me.Parent.H Then Return