[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.
This commit is contained in:
David Capello 2020-08-18 08:53:39 -03:00
parent 95ce7541e7
commit f44aad06db

View File

@ -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";
}