mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Revert previous plot display fix.
parent
40757b949d
commit
6a0f66c244
|
|
@ -340,34 +340,34 @@ class PlotAC(PamhyrPlot):
|
|||
self.color_complete_gl = self.get_line_gl_colors(line_2d)
|
||||
self.color_incomplete_gl = 2 * ["#000000"]
|
||||
|
||||
# if ind is not None:
|
||||
# before = ind - 1
|
||||
# after = ind + 1
|
||||
if ind is not None:
|
||||
before = ind - 1
|
||||
after = ind + 1
|
||||
|
||||
# self.before_plot_selected.set_data([], [])
|
||||
# self.plot_selected.set_data([], [])
|
||||
# self.after_plot_selected.set_data([], [])
|
||||
self.before_plot_selected.set_data([], [])
|
||||
self.plot_selected.set_data([], [])
|
||||
self.after_plot_selected.set_data([], [])
|
||||
|
||||
# if 0 <= before < self.data.number_profiles:
|
||||
# self.before_plot_selected.set_data(
|
||||
# self.data.profile(before).get_station(),
|
||||
# self.data.profile(before).z()
|
||||
# )
|
||||
if 0 <= before < self.data.number_profiles:
|
||||
self.before_plot_selected.set_data(
|
||||
self.data.profile(before).get_station(),
|
||||
self.data.profile(before).z()
|
||||
)
|
||||
|
||||
# if 0 <= ind < self.data.number_profiles:
|
||||
# self.plot_selected.set_data(
|
||||
# self.data.profile(ind).get_station(),
|
||||
# self.data.profile(ind).z()
|
||||
# )
|
||||
if 0 <= ind < self.data.number_profiles:
|
||||
self.plot_selected.set_data(
|
||||
self.data.profile(ind).get_station(),
|
||||
self.data.profile(ind).z()
|
||||
)
|
||||
|
||||
# if 0 <= after < self.data.number_profiles:
|
||||
# self.after_plot_selected.set_data(
|
||||
# self.data.profile(after).get_station(),
|
||||
# self.data.profile(after).z()
|
||||
# )
|
||||
if 0 <= after < self.data.number_profiles:
|
||||
self.after_plot_selected.set_data(
|
||||
self.data.profile(after).get_station(),
|
||||
self.data.profile(after).z()
|
||||
)
|
||||
|
||||
# self.update_annotate_full(ind)
|
||||
# else:
|
||||
self.update_annotate_full(ind)
|
||||
else:
|
||||
self.update_full()
|
||||
self.update_annotate_full(0)
|
||||
|
||||
|
|
|
|||
|
|
@ -185,55 +185,55 @@ class PlotKPZ(PamhyrPlot):
|
|||
self.draw()
|
||||
return
|
||||
|
||||
# if ind is not None:
|
||||
# before = ind - 1
|
||||
# after = ind + 1
|
||||
if ind is not None:
|
||||
before = ind - 1
|
||||
after = ind + 1
|
||||
|
||||
# self.before_plot_selected.set_visible(False)
|
||||
# self.plot_selected.set_visible(False)
|
||||
# self.after_plot_selected.set_visible(False)
|
||||
self.before_plot_selected.set_visible(False)
|
||||
self.plot_selected.set_visible(False)
|
||||
self.after_plot_selected.set_visible(False)
|
||||
|
||||
# if 0 <= before < self.data.number_profiles:
|
||||
# profile = self.data.profile(before)
|
||||
# if len(profile) > 0:
|
||||
# kp_i = profile.kp
|
||||
# z_min_i = profile.z_min()
|
||||
# z_max_i = profile.z_max()
|
||||
if 0 <= before < self.data.number_profiles:
|
||||
profile = self.data.profile(before)
|
||||
if len(profile) > 0:
|
||||
kp_i = profile.kp
|
||||
z_min_i = profile.z_min()
|
||||
z_max_i = profile.z_max()
|
||||
|
||||
# self.before_plot_selected.set_data(
|
||||
# (kp_i, kp_i),
|
||||
# (z_min_i, z_max_i)
|
||||
# )
|
||||
# self.before_plot_selected.set_visible(True)
|
||||
self.before_plot_selected.set_data(
|
||||
(kp_i, kp_i),
|
||||
(z_min_i, z_max_i)
|
||||
)
|
||||
self.before_plot_selected.set_visible(True)
|
||||
|
||||
# if 0 <= ind < self.data.number_profiles:
|
||||
# profile = self.data.profile(ind)
|
||||
# if len(profile) > 0:
|
||||
# kp_i = profile.kp
|
||||
# z_min_i = profile.z_min()
|
||||
# z_max_i = profile.z_max()
|
||||
if 0 <= ind < self.data.number_profiles:
|
||||
profile = self.data.profile(ind)
|
||||
if len(profile) > 0:
|
||||
kp_i = profile.kp
|
||||
z_min_i = profile.z_min()
|
||||
z_max_i = profile.z_max()
|
||||
|
||||
# self.plot_selected.set_data(
|
||||
# (kp_i, kp_i),
|
||||
# (z_min_i, z_max_i)
|
||||
# )
|
||||
# self.plot_selected.set_visible(True)
|
||||
self.plot_selected.set_data(
|
||||
(kp_i, kp_i),
|
||||
(z_min_i, z_max_i)
|
||||
)
|
||||
self.plot_selected.set_visible(True)
|
||||
|
||||
# if 0 <= after < self.data.number_profiles:
|
||||
# profile = self.data.profile(after)
|
||||
# if len(profile) > 0:
|
||||
# kp_i = profile.kp
|
||||
# z_min_i = profile.z_min()
|
||||
# z_max_i = profile.z_max()
|
||||
if 0 <= after < self.data.number_profiles:
|
||||
profile = self.data.profile(after)
|
||||
if len(profile) > 0:
|
||||
kp_i = profile.kp
|
||||
z_min_i = profile.z_min()
|
||||
z_max_i = profile.z_max()
|
||||
|
||||
# self.after_plot_selected.set_data(
|
||||
# (kp_i, kp_i),
|
||||
# (z_min_i, z_max_i)
|
||||
# )
|
||||
# self.after_plot_selected.set_visible(True)
|
||||
self.after_plot_selected.set_data(
|
||||
(kp_i, kp_i),
|
||||
(z_min_i, z_max_i)
|
||||
)
|
||||
self.after_plot_selected.set_visible(True)
|
||||
|
||||
# self.canvas.figure.canvas.draw_idle()
|
||||
# else:
|
||||
self.canvas.figure.canvas.draw_idle()
|
||||
else:
|
||||
kp = self.data.get_kp_complete_profiles()
|
||||
z_min = self.data.get_z_min()
|
||||
z_max = self.data.get_z_max()
|
||||
|
|
|
|||
|
|
@ -152,12 +152,12 @@ class PlotXY(PamhyrPlot):
|
|||
x_complete = list(self.data.get_guidelines_x())
|
||||
y_complete = list(self.data.get_guidelines_y())
|
||||
|
||||
self.line_gl = [
|
||||
self.canvas.axes.plot(
|
||||
x, y,
|
||||
)
|
||||
for x, y in zip(x_complete, y_complete)
|
||||
]
|
||||
# self.line_gl = [
|
||||
# self.canvas.axes.plot(
|
||||
# x, y,
|
||||
# )
|
||||
# for x, y in zip(x_complete, y_complete)
|
||||
# ]
|
||||
|
||||
for i in range(self.data.number_profiles):
|
||||
if i < len(self.line_xy):
|
||||
|
|
|
|||
|
|
@ -200,9 +200,9 @@ class GeometryWindow(PamhyrWindow):
|
|||
|
||||
def update(self):
|
||||
self.update_profile_windows()
|
||||
# self.plot_xy()
|
||||
# self.plot_kpc()
|
||||
# self.plot_ac()
|
||||
self.plot_xy()
|
||||
self.plot_kpc()
|
||||
self.plot_ac()
|
||||
|
||||
self.select_current_profile()
|
||||
self.changed_slider_value()
|
||||
|
|
@ -530,16 +530,16 @@ class GeometryWindow(PamhyrWindow):
|
|||
def _undo(self):
|
||||
self._table.undo()
|
||||
self.select_current_profile()
|
||||
# self.update_plot_ac()
|
||||
# self.update_plot_xy()
|
||||
# self.update_plot_kpc()
|
||||
self.update_plot_ac()
|
||||
self.update_plot_xy()
|
||||
self.update_plot_kpc()
|
||||
|
||||
def _redo(self):
|
||||
self._table.redo()
|
||||
self.select_current_profile()
|
||||
# self.update_plot_ac()
|
||||
# self.update_plot_xy()
|
||||
# self.update_plot_kpc()
|
||||
self.update_plot_ac()
|
||||
self.update_plot_xy()
|
||||
self.update_plot_kpc()
|
||||
|
||||
def export_to_file(self):
|
||||
settings = QSettings(
|
||||
|
|
|
|||
Loading…
Reference in New Issue