优化了重置绘图的代码

This commit is contained in:
Yorusora
2025-05-22 09:50:03 +08:00
parent c9b5e35867
commit 85a69648e0
5 changed files with 71 additions and 48 deletions

View File

@ -592,9 +592,6 @@ class MainWindow_artifact_label(QMainWindow):
else:
PublicFunc.text_output(self.ui, "(2/6)" + result.info, Constants.TIPS_TYPE_INFO)
self.__reset__()
PublicFunc.finish_operation(self, ButtonState)
# 获取存档
PublicFunc.progressbar_update(self, 3, 6, Constants.LOADING_ARCHIVE, 50)
result = self.data.get_archive()
@ -929,13 +926,15 @@ class MainWindow_artifact_label(QMainWindow):
PublicFunc.text_output(self.ui, f"{Constants.ARTIFACT_LABEL_JUMP_ARTIFACT}{str(self.pressed_number)}", Constants.TIPS_TYPE_INFO)
def reset_axes(self):
self.ax0.clear()
self.ax1.clear()
self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
if self.ax0 is not None:
self.ax0.clear()
self.ax0.grid(True)
self.ax0.xaxis.set_major_formatter(ConfigParams.FORMATTER)
self.ax0.tick_params(axis='x', colors=Constants.PLOT_COLOR_WHITE)
if self.ax1 is not None:
self.ax1.clear()
self.ax1.grid(True)
self.ax1.xaxis.set_major_formatter(ConfigParams.FORMATTER)
def on_xlim_change(self, event_ax):
try: