Skip to content
Snippets Groups Projects
Commit b69dbdf7 authored by s224389's avatar s224389
Browse files

Added "delete all points" button and functionality

parent 76ffa3d2
No related branches found
No related tags found
No related merge requests found
......@@ -215,6 +215,12 @@ class MainWindow(QMainWindow):
self.btn_export_points.clicked.connect(self.export_points)
btn_layout.addWidget(self.btn_export_points)
# Remove Points
self.btn_clear_points = QPushButton("Clear Points")
self.btn_clear_points.clicked.connect(self.clear_points)
btn_layout.addWidget(self.btn_clear_points)
main_layout.addLayout(btn_layout)
self.setCentralWidget(main_widget)
self.resize(900, 600)
......@@ -256,6 +262,13 @@ class MainWindow(QMainWindow):
print(f"Exported {len(points_array)} points to {file_path}")
def clear_points(self):
"""Remove all placed points (list & scene)."""
self.image_view.points.clear()
self.image_view._clear_point_items()
def main():
app = QApplication(sys.argv)
window = MainWindow()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment