From 5fb0b72c732e0b54c77f2ac7149100ecb2e1b976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Capello?= Date: Wed, 22 Mar 2023 18:02:41 -0300 Subject: [PATCH] Fix hexpand and vexpand setting --- src/app/script/dialog_class.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/script/dialog_class.cpp b/src/app/script/dialog_class.cpp index 32bd90894..79c4c725d 100644 --- a/src/app/script/dialog_class.cpp +++ b/src/app/script/dialog_class.cpp @@ -470,10 +470,11 @@ int Dialog_add_widget(lua_State* L, Widget* widget) // specific widget is not expansive (e.g. a canvas with a fixed // size) type = lua_getfield(L, 2, "hexpand"); + if (type != LUA_TNIL) hexpand = lua_toboolean(L, -1); + lua_pop(L, 1); type = lua_getfield(L, 2, "vexpand"); - if (type != LUA_TNIL) hexpand = lua_toboolean(L, -2); if (type != LUA_TNIL) vexpand = lua_toboolean(L, -1); - lua_pop(L, 2); + lua_pop(L, 1); } if (label || !dlg->hbox) {