Commit 6b8b1b8e authored by Pierre-Antoine Rouby's avatar Pierre-Antoine Rouby
Browse files

Geometry: Fix update.

Showing with 13 additions and 10 deletions
+13 -10
...@@ -205,16 +205,19 @@ class GeometryWindow(PamhyrWindow): ...@@ -205,16 +205,19 @@ class GeometryWindow(PamhyrWindow):
.selectionChanged\ .selectionChanged\
.connect(self.select_current_profile) .connect(self.select_current_profile)
self._table.layoutChanged.connect(self.update) self._table.layoutChanged.connect(self.update_redraw)
def update(self): def update(self):
self._update() self._update()
def _update(self, propagate=True): def update_redraw(self):
self.update_profile_windows() self._update(redraw=True)
self.plot_xy()
self.plot_kpc() def _update(self, redraw=False, propagate=True):
self.plot_ac() if redraw:
self._plot_xy.draw()
self._plot_kpc.draw()
self._plot_ac.draw()
self.select_current_profile() self.select_current_profile()
self.changed_slider_value() self.changed_slider_value()
...@@ -318,10 +321,6 @@ class GeometryWindow(PamhyrWindow): ...@@ -318,10 +321,6 @@ class GeometryWindow(PamhyrWindow):
def changed_profile_slot(self, status): def changed_profile_slot(self, status):
self.update_view1 = status self.update_view1 = status
def update_profile_windows(self):
self.list_second_window = []
self.list_row = []
def plot_xy(self): def plot_xy(self):
self.tableView.model().blockSignals(True) self.tableView.model().blockSignals(True)
...@@ -422,6 +421,10 @@ class GeometryWindow(PamhyrWindow): ...@@ -422,6 +421,10 @@ class GeometryWindow(PamhyrWindow):
self.select_plot_xy(row) self.select_plot_xy(row)
self.select_plot_kpc(row) self.select_plot_kpc(row)
self.select_plot_ac(row) self.select_plot_ac(row)
else:
self._plot_xy.draw()
self._plot_kpc.draw()
self._plot_ac.draw()
self.tableView.model().blockSignals(False) self.tableView.model().blockSignals(False)
......
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