mirror of https://gitlab.com/pamhyr/pamhyr2
IC: Sync axes between the two plots and minor change.
parent
f3abb003f4
commit
240367fed1
|
|
@ -30,16 +30,20 @@ class PlotDKP(APlot):
|
||||||
|
|
||||||
self.canvas.axes.set_ylabel(
|
self.canvas.axes.set_ylabel(
|
||||||
_translate("MainWindow_reach", "Draft (m)"),
|
_translate("MainWindow_reach", "Draft (m)"),
|
||||||
color='green', fontsize=12
|
color='green', fontsize=11
|
||||||
)
|
)
|
||||||
self.canvas.axes.set_xlabel(
|
self.canvas.axes.set_xlabel(
|
||||||
_translate("MainWindow_reach", "KP (m)"),
|
_translate("MainWindow_reach", "KP (m)"),
|
||||||
color='green', fontsize=12
|
color='green', fontsize=11
|
||||||
)
|
)
|
||||||
|
|
||||||
kp = self.data.reach.reach.get_kp()
|
kp = self.data.reach.reach.get_kp()
|
||||||
z_min = self.data.reach.reach.get_z_min()
|
z_min = self.data.reach.reach.get_z_min()
|
||||||
|
|
||||||
|
self.canvas.axes.set_xlim(
|
||||||
|
left = min(kp), right = max(kp)
|
||||||
|
)
|
||||||
|
|
||||||
self.line_kp_zmin = self.canvas.axes.plot(
|
self.line_kp_zmin = self.canvas.axes.plot(
|
||||||
kp, z_min,
|
kp, z_min,
|
||||||
color='grey', lw=1.
|
color='grey', lw=1.
|
||||||
|
|
|
||||||
|
|
@ -29,12 +29,18 @@ class PlotFlow(APlot):
|
||||||
return
|
return
|
||||||
|
|
||||||
self.canvas.axes.set_ylabel(
|
self.canvas.axes.set_ylabel(
|
||||||
_translate("MainWindow_reach", "Flow (m³/s)"),
|
_translate("MainWindow_reach", "Flow (m^3/s)"),
|
||||||
color='green', fontsize=12
|
color='green', fontsize=11
|
||||||
)
|
)
|
||||||
self.canvas.axes.set_xlabel(
|
self.canvas.axes.set_xlabel(
|
||||||
_translate("MainWindow_reach", "KP (m)"),
|
_translate("MainWindow_reach", "KP (m)"),
|
||||||
color='green', fontsize=12
|
color='green', fontsize=11
|
||||||
|
)
|
||||||
|
|
||||||
|
kp = self.data.reach.reach.get_kp()
|
||||||
|
|
||||||
|
self.canvas.axes.set_xlim(
|
||||||
|
left = min(kp), right = max(kp)
|
||||||
)
|
)
|
||||||
|
|
||||||
kp = self.data.get_kp()
|
kp = self.data.get_kp()
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,6 @@ class InitialConditionsWindow(ASubMainWindow, ListedSubWindow):
|
||||||
data = self._ics,
|
data = self._ics,
|
||||||
toolbar = None,
|
toolbar = None,
|
||||||
)
|
)
|
||||||
|
|
||||||
self.plot_2.draw()
|
self.plot_2.draw()
|
||||||
|
|
||||||
def setup_connections(self):
|
def setup_connections(self):
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,8 @@ class LateralContributionWindow(ASubMainWindow, ListedSubWindow):
|
||||||
else:
|
else:
|
||||||
self._table[tab].add(rows[0])
|
self._table[tab].add(rows[0])
|
||||||
|
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def delete(self):
|
def delete(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
rows = self.index_selected_rows()
|
rows = self.index_selected_rows()
|
||||||
|
|
@ -204,34 +206,42 @@ class LateralContributionWindow(ASubMainWindow, ListedSubWindow):
|
||||||
return
|
return
|
||||||
|
|
||||||
self._table[tab].delete(rows)
|
self._table[tab].delete(rows)
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def sort(self):
|
def sort(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
self._table[tab].sort(False)
|
self._table[tab].sort(False)
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def move_up(self):
|
def move_up(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
row = self.index_selected_row()
|
row = self.index_selected_row()
|
||||||
self._table[tab].move_up(row)
|
self._table[tab].move_up(row)
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def move_down(self):
|
def move_down(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
row = self.index_selected_row()
|
row = self.index_selected_row()
|
||||||
self._table[tab].move_down(row)
|
self._table[tab].move_down(row)
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
print("TODO")
|
print("TODO")
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def paste(self):
|
def paste(self):
|
||||||
print("TODO")
|
print("TODO")
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def undo(self):
|
def undo(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
self._table[tab].undo()
|
self._table[tab].undo()
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def redo(self):
|
def redo(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
self._table[tab].redo()
|
self._table[tab].redo()
|
||||||
|
self._set_current_reach()
|
||||||
|
|
||||||
def edit(self):
|
def edit(self):
|
||||||
tab = self.current_tab()
|
tab = self.current_tab()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue