优化了重置绘图的代码
This commit is contained in:
@ -300,8 +300,10 @@ class MainWindow_artifact_label(QMainWindow):
|
||||
del self.rectangles_ax0_patches
|
||||
del self.rectangles_ax1_patches
|
||||
del self.annotation_tableWidget
|
||||
self.ax0.clear()
|
||||
self.ax1.clear()
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
if self.ax1 is not None:
|
||||
self.ax1.clear()
|
||||
|
||||
# 释放资源
|
||||
del self.data
|
||||
|
||||
@ -204,7 +204,8 @@ class MainWindow_detect_Jpeak(QMainWindow):
|
||||
QApplication.processEvents()
|
||||
|
||||
# 清空画框
|
||||
self.ax0.clear()
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
|
||||
# 释放资源
|
||||
del self.data
|
||||
|
||||
@ -197,8 +197,10 @@ class MainWindow_detect_Rpeak(QMainWindow):
|
||||
QApplication.processEvents()
|
||||
|
||||
# 清空画框
|
||||
self.ax0.clear()
|
||||
self.ax1.clear()
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
if self.ax1 is not None:
|
||||
self.ax1.clear()
|
||||
|
||||
# 释放资源
|
||||
del self.data
|
||||
|
||||
@ -340,8 +340,10 @@ class MainWindow_label_check(QMainWindow):
|
||||
del self.point_peak_original
|
||||
del self.point_peak_corrected
|
||||
del self.annotation_tableWidget
|
||||
self.ax0.clear()
|
||||
self.ax1.clear()
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
if self.ax1 is not None:
|
||||
self.ax1.clear()
|
||||
|
||||
# 释放资源
|
||||
del self.data
|
||||
|
||||
@ -239,7 +239,8 @@ class MainWindow_preprocess(QMainWindow):
|
||||
QApplication.processEvents()
|
||||
|
||||
# 清空画框
|
||||
self.ax0.clear()
|
||||
if self.ax0 is not None:
|
||||
self.ax0.clear()
|
||||
|
||||
# 释放资源
|
||||
del self.data
|
||||
|
||||
Reference in New Issue
Block a user