debug colors

This commit is contained in:
Theophile Terraz committed 2024-10-02 14:33:07 +02:00
1 parent 239ee905e7
commit 82c386806a
4 files changed
+40 -43

No files matched your search

+4 -4
View File
@@ -60,7 +60,7 @@ class PlotXY(PamhyrPlot):
def onpick(self, event):
if event.mouseevent.inaxes != self.canvas.axes:
return
if event.mouseevent.button.value not in [1, 3]:
if event.mouseevent.button not in [1, 3]:
return
closest = self._closest_section(event)
@@ -70,9 +70,9 @@ class PlotXY(PamhyrPlot):
index = tableView.selectedIndexes()
rk = self.data.get_rk()
if self.parent._table is not None:
if event.mouseevent.button.value == 1:
if event.mouseevent.button == 1:
table.setData(index[3], rk[closest[0]])
if event.mouseevent.button.value == 3:
if event.mouseevent.button == 3:
table.setData(index[4], rk[closest[0]])
return
@@ -141,7 +141,7 @@ class PlotXY(PamhyrPlot):
if self._highlight_data is not None:
rk_min, rk_max = self._highlight_data
colors = [self.color_plot for row in range(len(self._data))]
colors = [self.color_plot_river_bottom for row in range(len(self._data))]
for i, rk in enumerate(self.data.get_rk_complete_profiles()):
if rk_min <= rk <= rk_max:
colors[i] = self.color_plot_current