From f44aad06db9d7a7efe9beb0038df37140ac9c2ba Mon Sep 17 00:00:00 2001 From: David Capello Date: Tue, 18 Aug 2020 08:53:39 -0300 Subject: [PATCH] [lua] Fix Dialog:file{ save=true } so 'save' field must be =true Before this change if we used Dialog:file{ save=false } it would show the save version of the dialog, which didn't make sense. --- src/app/script/dialog_class.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/script/dialog_class.cpp b/src/app/script/dialog_class.cpp index 07c70af1d..bb120343b 100644 --- a/src/app/script/dialog_class.cpp +++ b/src/app/script/dialog_class.cpp @@ -777,7 +777,7 @@ int Dialog_file(lua_State* L) lua_pop(L, 1); int type = lua_getfield(L, 2, "save"); - if (type == LUA_TBOOLEAN) { + if (type == LUA_TBOOLEAN && lua_toboolean(L, -1)) { dlgType = FileSelectorType::Save; title = "Save File"; }