diff --git a/annolid/gui/app.py b/annolid/gui/app.py index b0633998..fd79efd7 100644 --- a/annolid/gui/app.py +++ b/annolid/gui/app.py @@ -229,6 +229,8 @@ def __init__(self, self.canvas.drawingPolygon.connect(self.toggleDrawingSensitive) self.canvas.vertexSelected.connect(self.actions.removePoint.setEnabled) + self.flag_widget.itemClicked.connect(self.flag_item_clicked) + self.setCentralWidget(scrollArea) self.createPolygonSAMMode = action( @@ -467,6 +469,13 @@ def update_step_size(self, value): self.step_size = value self.stepSizeWidget.setValue(self.step_size) + def flag_item_clicked(self, item): + item_text = item.text() + # Call self.add_highlighted_mark with the clicked item as mark_type + if self.seekbar: + self.add_highlighted_mark( + self.frame_number, mark_type=item_text) + def openAudio(self): if self.video_file: self.audio_widget = AudioWidget(self.video_file)