Skip to content

Commit

Permalink
Implement event marker addition upon clicking an item in the flags dock
Browse files Browse the repository at this point in the history
  • Loading branch information
healthonrails committed Aug 21, 2023
1 parent 0996ab0 commit 62c0499
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions annolid/gui/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 62c0499

Please sign in to comment.