Fix error box in flight creation.

(cherry picked from commit a81254cd1830cd8ad57ac41de017d94e1c9eb0a5)
This commit is contained in:
Dan Albert 2020-11-13 21:00:55 -08:00
parent c4d08fa7b7
commit 95fd4cab05

View File

@ -3,6 +3,7 @@ from typing import Optional
from PySide2.QtCore import Qt, Signal
from PySide2.QtWidgets import (
QDialog,
QMessageBox,
QPushButton,
QVBoxLayout,
)
@ -95,7 +96,8 @@ class QFlightCreator(QDialog):
def create_flight(self) -> None:
error = self.verify_form()
if error is not None:
self.error_box("Could not create flight", error)
QMessageBox.critical(self, "Could not create flight", error,
QMessageBox.Ok)
return
task = self.task_selector.currentData()