From ff3b14978aaff306958b3ef81ef106f99608aa66 Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 31 Mar 2021 15:34:11 -0300 Subject: [PATCH] Comment ASSERT() that can happen in ButtonSet --- src/app/ui/button_set.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/app/ui/button_set.cpp b/src/app/ui/button_set.cpp index 169c31140..2b05c6826 100644 --- a/src/app/ui/button_set.cpp +++ b/src/app/ui/button_set.cpp @@ -1,5 +1,5 @@ // Aseprite -// Copyright (C) 2018-2020 Igara Studio S.A. +// Copyright (C) 2018-2021 Igara Studio S.A. // Copyright (C) 2001-2017 David Capello // // This program is distributed under the terms of @@ -196,7 +196,9 @@ bool ButtonSet::Item::onProcessMessage(ui::Message* msg) // user leaves the ButtonSet without releasing the mouse button // and the mouse capture if offered to other ButtonSet. if (buttonSet()->m_triggerOnMouseUp) { - ASSERT(g_itemBeforeCapture < 0); + // g_itemBeforeCapture can be >= 0 if we clicked other button + // without releasing the first button. + //ASSERT(g_itemBeforeCapture < 0); g_itemBeforeCapture = buttonSet()->selectedItem(); }