优化了重置绘图的代码

This commit is contained in:
Yorusora
2025-05-22 10:02:32 +08:00
parent 85a69648e0
commit a7758e502e
5 changed files with 16 additions and 8 deletions

View File

@ -300,7 +300,9 @@ class MainWindow_artifact_label(QMainWindow):
del self.rectangles_ax0_patches del self.rectangles_ax0_patches
del self.rectangles_ax1_patches del self.rectangles_ax1_patches
del self.annotation_tableWidget del self.annotation_tableWidget
if self.ax0 is not None:
self.ax0.clear() self.ax0.clear()
if self.ax1 is not None:
self.ax1.clear() self.ax1.clear()
# 释放资源 # 释放资源

View File

@ -204,6 +204,7 @@ class MainWindow_detect_Jpeak(QMainWindow):
QApplication.processEvents() QApplication.processEvents()
# 清空画框 # 清空画框
if self.ax0 is not None:
self.ax0.clear() self.ax0.clear()
# 释放资源 # 释放资源

View File

@ -197,7 +197,9 @@ class MainWindow_detect_Rpeak(QMainWindow):
QApplication.processEvents() QApplication.processEvents()
# 清空画框 # 清空画框
if self.ax0 is not None:
self.ax0.clear() self.ax0.clear()
if self.ax1 is not None:
self.ax1.clear() self.ax1.clear()
# 释放资源 # 释放资源

View File

@ -340,7 +340,9 @@ class MainWindow_label_check(QMainWindow):
del self.point_peak_original del self.point_peak_original
del self.point_peak_corrected del self.point_peak_corrected
del self.annotation_tableWidget del self.annotation_tableWidget
if self.ax0 is not None:
self.ax0.clear() self.ax0.clear()
if self.ax1 is not None:
self.ax1.clear() self.ax1.clear()
# 释放资源 # 释放资源

View File

@ -239,6 +239,7 @@ class MainWindow_preprocess(QMainWindow):
QApplication.processEvents() QApplication.processEvents()
# 清空画框 # 清空画框
if self.ax0 is not None:
self.ax0.clear() self.ax0.clear()
# 释放资源 # 释放资源