From 8674e5c0bd9bc8842417973994df3383e06f8ec7 Mon Sep 17 00:00:00 2001 From: georgikoemdzhiev Date: Fri, 18 Oct 2019 17:38:56 +0100 Subject: [PATCH] Uncheck 'Pressed' if toggle_mode is unchecked --- scene/gui/base_button.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index d8229b5f433..6fef44481af 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -271,6 +271,11 @@ BaseButton::DrawMode BaseButton::get_draw_mode() const { } void BaseButton::set_toggle_mode(bool p_on) { + // Make sure to set 'pressed' to false if we are not in toggle mode + if (!p_on) { + set_pressed(false); + } + toggle_mode = p_on; }