Skip to content

Commit cfbc5a8

Browse files
committed
use warnings framework
1 parent 335ef86 commit cfbc5a8

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

openmc_plotter/main_window.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1083,10 +1083,13 @@ def restoreModelSettings(self):
10831083
if (current_mat_xml_hash != model.mat_xml_hash) or \
10841084
(current_geom_xml_hash != model.geom_xml_hash):
10851085
# hashes do not match so ignore plot_settings.pkl file
1086-
pkl_settings_warn = "WARNING: Model has changed since " +\
1087-
"storing plot settings. Ignoring " +\
1088-
"previous plot settings."
1089-
print(pkl_settings_warn)
1086+
msg_box = QMessageBox()
1087+
msg = "WARNING: Model has changed since storing plot " +\
1088+
"settings. Ignoring previous plot settings."
1089+
msg_box.setText(msg)
1090+
msg_box.setIcon(QMessageBox.Warning)
1091+
msg_box.setStandardButtons(QMessageBox.Ok)
1092+
msg_box.exec_()
10901093
return
10911094

10921095
# do not replace model if the version is out of date

0 commit comments

Comments
 (0)