diff --git a/src/aare/gui/panels/tell_sample_panel.py b/src/aare/gui/panels/tell_sample_panel.py index 26a4ee8a..f811f02c 100644 --- a/src/aare/gui/panels/tell_sample_panel.py +++ b/src/aare/gui/panels/tell_sample_panel.py @@ -318,6 +318,11 @@ class TellSamplePanel(QFrame): mount_action = menu.addAction("Mount") # Unmount moved here from the removed bottom-row button — same signal. unmount_action = menu.addAction("Unmount") + menu.addSeparator() + # Flagging happens by dropping rows on the Flagged chip; this is the + # only way back, so it lives here even though Flag does not. + unflag_action = menu.addAction(f"Unflag{count}") + unflag_action.setEnabled(any(s.db_id in self.table_model.flagged_ids for s in selected)) action = menu.exec_(self.table_view.viewport().mapToGlobal(position)) @@ -331,6 +336,10 @@ class TellSamplePanel(QFrame): elif action == remove_queue_action: self.remove_from_queue.emit(SampleShortInfoList(s=selected)) self.table_view.clearSelection() + elif action == unflag_action: + for s in selected: + self.table_model.set_flagged(s.db_id, False) + self.table_view.clearSelection() def header_context_menu(self, pos): header = self.table_view.horizontalHeader()