warning popup when export format for geometry reach is not .st

dev_dylan
Dylan Jeannin 2026-04-28 14:30:40 +02:00
parent 51dd6d27c5
commit 6165719829
2 changed files with 13 additions and 1 deletions

View File

@ -91,3 +91,9 @@ class GeometryTranslate(MainTranslate):
self._dict["Shift"] = _translate(
"Geometry", "Shift"
)
self._dict["warning"] = _translate(
"Geometry", "Warning"
)
self._dict["format_not_exportable"] = _translate(
"Geometry", "The format of the file is not exportable."
)

View File

@ -691,7 +691,13 @@ class GeometryWindow(PamhyrWindow):
if suffix == ".st" or suffix == ".ST":
self._export_to_file_st(filename[:-3])
else:
# TODO : prévenir l'utilisateur que le format n'est pas exportable
# Warning popup when the format is not exportable
win = QtWidgets.QMessageBox()
win.setIcon(QtWidgets.QMessageBox.Warning)
win.setWindowTitle(self._trad["warning"])
win.setText(self._trad["format_not_exportable"])
win.exec()
pass
else:
self._export_to_file_st(filename)