Commit 02bfa337 authored by magho's avatar magho

made warning dialogs non-blocking

parent bce30485
......@@ -169,14 +169,14 @@ TODO: Scan RFID card to buy Cart.
none_message = "API failed to return an item for location {0}.".format(location)
warning = TimerMessageBox(message=none_message, parent=self)
warning.setIcon(QtWidgets.QMessageBox.Critical)
warning.exec_()
warning.show()
return
elif 'error' in item.keys():
# Warn about API error
api_message = "API returned error '{0}' for location '{1}.".format(item['error'], location)
warning = TimerMessageBox(message=api_message, parent=self)
warning.setIcon(QtWidgets.QMessageBox.Critical)
warning.exec_()
warning.show()
return
def has_items(self):
......
......@@ -305,7 +305,7 @@ Double click an item to add it to the cart."""
missing_message = "No valid storage position was found for this item. Please contact a workshop board member."
warning = TimerMessageBox(message=baklager_message, parent=self)
warning.setIcon(QtWidgets.QMessageBox.Critical)
warning.exec_()
warning.show()
return
if lager[lager_choice]['type'] == 'Baklager':
......@@ -314,7 +314,7 @@ Double click an item to add it to the cart."""
baklager_message = "This item is only available at a Baklager. Please contact a board member to buy this item."
warning = TimerMessageBox(message=baklager_message, parent=self)
warning.setIcon(QtWidgets.QMessageBox.Critical)
warning.exec_()
warning.show()
return
# Add lager_choice
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment