1
0
mirror of https://github.com/kepler155c/opus synced 2025-10-29 06:37:40 +00:00

properly handle empty text entry fields (including transformations)

This commit is contained in:
kepler155c@gmail.com
2019-11-13 14:24:43 -07:00
parent 053003f429
commit 65c6ebf711
10 changed files with 131 additions and 83 deletions

View File

@@ -39,7 +39,7 @@ local labelTab = UI.Tab {
}
function labelTab:eventHandler(event)
if event.type == 'update_label' then
if event.type == 'update_label' and self.label.value then
os.setComputerLabel(self.label.value)
self:emit({ type = 'success_message', message = 'Label updated' })
return true

View File

@@ -59,7 +59,7 @@ function tab:save()
end
function tab:eventHandler(event)
if event.type == 'update_path' then
if event.type == 'update_path' and self.entry.value then
table.insert(self.grid.values, {
value = self.entry.value,
})