Skip to content

Commit

Permalink
[lua] Fix Dialog:file{ save=true } so 'save' field must be =true
Browse files Browse the repository at this point in the history
Before this change if we used Dialog:file{ save=false } it would show
the save version of the dialog, which didn't make sense.
  • Loading branch information
dacap committed Aug 18, 2020
1 parent 95ce754 commit f44aad0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/script/dialog_class.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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";
}
Expand Down

0 comments on commit f44aad0

Please sign in to comment.