From 2c3fd2171bdd6e34a5d6d43534518f126de991f9 Mon Sep 17 00:00:00 2001 From: David Capello Date: Sat, 4 Apr 2020 19:41:30 -0300 Subject: [PATCH] [lua] Fix Dialog.data for checkboxes if the last pressed button was a checkbox --- src/app/script/dialog_class.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/script/dialog_class.cpp b/src/app/script/dialog_class.cpp index 6434da959..6426aa531 100644 --- a/src/app/script/dialog_class.cpp +++ b/src/app/script/dialog_class.cpp @@ -396,7 +396,8 @@ int Dialog_button_base(lua_State* L, T** outputWidget = nullptr) Dialog_connect_signal( L, 1, widget->Click, [dlg, widget](lua_State* L, Event&){ - dlg->lastButton = widget; + if (widget->type() == ui::kButtonWidget) + dlg->lastButton = widget; }); closeWindowByDefault = false; }