Skip to content

Commit

Permalink
Fixed non-dark-mode diags
Browse files Browse the repository at this point in the history
  • Loading branch information
cspang1 committed Jul 22, 2021
1 parent f1bd4f2 commit 0bd0292
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
12 changes: 6 additions & 6 deletions src/actions_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,21 @@ def add_action(self):
if not new_sys[1]:
return
if not str.strip(new_sys[0]):
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
self.text + " name cannot be blank",
).exec()
)
elif new_sys[0] in [
self.action_list.item(i).text() for i in range(
self.action_list.count()
)
]:
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
self.text + " already exists",
).exec()
)
else:
valid = True

Expand Down
12 changes: 6 additions & 6 deletions src/events_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,21 @@ def add_event(self):
if not new_event[1]:
return
if not str.strip(new_event[0]):
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
"Event cannot be blank",
).exec()
)
elif new_event[0] in [
self.event_list.item(i).text() for i in range(
self.event_list.count()
)
]:
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
"Event already exists",
).exec()
)
else:
valid = True

Expand Down
18 changes: 9 additions & 9 deletions src/info_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,21 +230,21 @@ def mnem_selected(self, index):
if not selected[1]:
return
elif not str.strip(selected[0]):
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
"Mnemonic cannot be blank",
).exec()
)
elif selected[0] in [
self.mnem_select.itemText(i) for i in range(
self.mnem_select.count()
)
]:
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
"Mnemonic already exists",
).exec()
)
else:
named = True
mnemonic = selected[0]
Expand Down Expand Up @@ -303,11 +303,11 @@ def load_cfg(self, file_name=None):
try:
config = json.load(config_file)
except Exception as e:
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
f"Unable to load config file: {e}"
).exec()
)
return

# Extract data
Expand Down
6 changes: 3 additions & 3 deletions src/mission_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,11 @@ def load_mission(self, config, timer, time, recovered=None):
with open(temp_cfg, 'w') as save_cfg_file:
save_cfg_file.write(json.dumps(config))
else:
QMessageBox(
QMessageBox.Critical,
QMessageBox.critical(
self,
"Error",
f"Unable to load recovered config file: {temp_cfg}"
).exec()
)
return
if recovered:
self.recover_log(recovered)
Expand Down

0 comments on commit 0bd0292

Please sign in to comment.