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(
|
||||
_translate("MainWindow_reach", "Draft (m)"),
|
||||
color='green', fontsize=12
|
||||
color='green', fontsize=11
|
||||
)
|
||||
self.canvas.axes.set_xlabel(
|
||||
_translate("MainWindow_reach", "KP (m)"),
|
||||
color='green', fontsize=12
|
||||
color='green', fontsize=11
|
||||
)
|
||||
|
||||
kp = self.data.reach.reach.get_kp()
|
||||
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(
|
||||
kp, z_min,
|
||||
color='grey', lw=1.
|
||||
|
|
|
|||
|
|
@ -29,12 +29,18 @@ class PlotFlow(APlot):
|
|||
return
|
||||
|
||||
self.canvas.axes.set_ylabel(
|
||||
_translate("MainWindow_reach", "Flow (m³/s)"),
|
||||
color='green', fontsize=12
|
||||
_translate("MainWindow_reach", "Flow (m^3/s)"),
|
||||
color='green', fontsize=11
|
||||
)
|
||||
self.canvas.axes.set_xlabel(
|
||||
_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()
|
||||
|
|
|
|||
|
|
@ -119,7 +119,6 @@ class InitialConditionsWindow(ASubMainWindow, ListedSubWindow):
|
|||
data = self._ics,
|
||||
toolbar = None,
|
||||
)
|
||||
|
||||
self.plot_2.draw()
|
||||
|
||||
def setup_connections(self):
|
||||
|
|
|
|||
|
|
@ -197,6 +197,8 @@ class LateralContributionWindow(ASubMainWindow, ListedSubWindow):
|
|||
else:
|
||||
self._table[tab].add(rows[0])
|
||||
|
||||
self._set_current_reach()
|
||||
|
||||
def delete(self):
|
||||
tab = self.current_tab()
|
||||
rows = self.index_selected_rows()
|
||||
|
|
@ -204,34 +206,42 @@ class LateralContributionWindow(ASubMainWindow, ListedSubWindow):
|
|||
return
|
||||
|
||||
self._table[tab].delete(rows)
|
||||
self._set_current_reach()
|
||||
|
||||
def sort(self):
|
||||
tab = self.current_tab()
|
||||
self._table[tab].sort(False)
|
||||
self._set_current_reach()
|
||||
|
||||
def move_up(self):
|
||||
tab = self.current_tab()
|
||||
row = self.index_selected_row()
|
||||
self._table[tab].move_up(row)
|
||||
self._set_current_reach()
|
||||
|
||||
def move_down(self):
|
||||
tab = self.current_tab()
|
||||
row = self.index_selected_row()
|
||||
self._table[tab].move_down(row)
|
||||
self._set_current_reach()
|
||||
|
||||
def copy(self):
|
||||
print("TODO")
|
||||
self._set_current_reach()
|
||||
|
||||
def paste(self):
|
||||
print("TODO")
|
||||
self._set_current_reach()
|
||||
|
||||
def undo(self):
|
||||
tab = self.current_tab()
|
||||
self._table[tab].undo()
|
||||
self._set_current_reach()
|
||||
|
||||
def redo(self):
|
||||
tab = self.current_tab()
|
||||
self._table[tab].redo()
|
||||
self._set_current_reach()
|
||||
|
||||
def edit(self):
|
||||
tab = self.current_tab()
|
||||
|
|
|
|||
Loading…
Reference in New Issue