mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Export geometry: popup displayed before (and not after anymore) the file browser to choose if we export only geometry points, or if we want interpolated ones too
This commit is contained in:
1 parent
8db099c5c7
commit
e9aa980c88
1 file changed
+8
-8
@@ -805,6 +805,10 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
# self.update_plot_rkc()
|
# self.update_plot_rkc()
|
||||||
|
|
||||||
def export_to_file(self):
|
def export_to_file(self):
|
||||||
|
export_interpolated = self._ask_export_options()
|
||||||
|
if export_interpolated is None:
|
||||||
|
return
|
||||||
|
|
||||||
settings = QSettings(
|
settings = QSettings(
|
||||||
QSettings.IniFormat,
|
QSettings.IniFormat,
|
||||||
QSettings.UserScope, 'MyOrg'
|
QSettings.UserScope, 'MyOrg'
|
||||||
@@ -834,11 +838,9 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
suffix = Path(filename).suffix
|
suffix = Path(filename).suffix
|
||||||
if suffix != "":
|
if suffix != "":
|
||||||
if suffix == ".st" or suffix == ".ST":
|
if suffix == ".st" or suffix == ".ST":
|
||||||
export_interpolated = self._ask_export_options()
|
self._export_to_file_st(
|
||||||
if export_interpolated is not None:
|
filename[:-3], export_interpolated
|
||||||
self._export_to_file_st(
|
)
|
||||||
filename[:-3], export_interpolated
|
|
||||||
)
|
|
||||||
else:
|
else:
|
||||||
# Warning popup when the format is not exportable
|
# Warning popup when the format is not exportable
|
||||||
win = QtWidgets.QMessageBox()
|
win = QtWidgets.QMessageBox()
|
||||||
@@ -849,9 +851,7 @@ class GeometryWindow(PamhyrWindow):
|
|||||||
|
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
export_interpolated = self._ask_export_options()
|
self._export_to_file_st(filename, export_interpolated)
|
||||||
if export_interpolated is not None:
|
|
||||||
self._export_to_file_st(filename, export_interpolated)
|
|
||||||
|
|
||||||
def _ask_export_options(self):
|
def _ask_export_options(self):
|
||||||
win = QtWidgets.QMessageBox(self)
|
win = QtWidgets.QMessageBox(self)
|
||||||
|
|||||||
Reference in new issue
Block a user