fix button command execution without altative command

This commit is contained in:
2021-04-08 14:42:49 +02:00
parent 25834e99da
commit 2f257a1ee7

View File

@@ -145,7 +145,10 @@ class Button(Div):
def click(self, msg):
self.state = process(self.state_command)
if search(self.state_pattern, self.state):
process_shell(self.command_alt)
if self.command_alt is None:
process_shell(self.command)
else:
process_shell(self.command_alt)
if self.image_alt:
self.components[0] = self.image_alt_element
elif self.icon_alt: