Commit 7ef2df85 authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Window update minor change.

Showing with 11 additions and 16 deletions
+11 -16
...@@ -192,6 +192,17 @@ class GeometryWindow(PamhyrWindow): ...@@ -192,6 +192,17 @@ class GeometryWindow(PamhyrWindow):
.selectionChanged\ .selectionChanged\
.connect(self.select_current_profile) .connect(self.select_current_profile)
self._table.layoutChanged.connect(self.update)
def update(self):
self.update_profile_windows()
self.plot_xy()
self.plot_kpc()
self.plot_ac()
self.select_current_profile()
self.changed_slider_value()
def import_from_file(self): def import_from_file(self):
options = QFileDialog.Options() options = QFileDialog.Options()
settings = QSettings(QSettings.IniFormat, settings = QSettings(QSettings.IniFormat,
...@@ -216,11 +227,6 @@ class GeometryWindow(PamhyrWindow): ...@@ -216,11 +227,6 @@ class GeometryWindow(PamhyrWindow):
size = os.stat(filename).st_size size = os.stat(filename).st_size
self._table.import_geometry(0, filename) self._table.import_geometry(0, filename)
self.update_profile_windows()
self.plot_xy()
self.plot_kpc()
self.plot_ac()
def edit_profile(self): def edit_profile(self):
self.tableView.model().blockSignals(True) self.tableView.model().blockSignals(True)
...@@ -252,11 +258,6 @@ class GeometryWindow(PamhyrWindow): ...@@ -252,11 +258,6 @@ class GeometryWindow(PamhyrWindow):
mesher = MeshingWithMage() mesher = MeshingWithMage()
self._table.meshing(mesher, -1) self._table.meshing(mesher, -1)
self.update_profile_windows()
self.plot_xy()
self.plot_kpc()
self.plot_ac()
pyqtSlot(bool) pyqtSlot(bool)
def changed_profile_slot(self, status): def changed_profile_slot(self, status):
...@@ -412,12 +413,6 @@ class GeometryWindow(PamhyrWindow): ...@@ -412,12 +413,6 @@ class GeometryWindow(PamhyrWindow):
if len(rows) > 0: if len(rows) > 0:
self._table.delete(rows) self._table.delete(rows)
self.update_plot_xy()
self.select_current_profile()
self.plot_kpc()
self.changed_slider_value()
def index_selected_row(self): def index_selected_row(self):
return self.tableView\ return self.tableView\
.selectionModel()\ .selectionModel()\
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment