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:
@@ -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
|
||||
|
||||
@@ -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,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user