diff --git a/eddy/ui/ontology.py b/eddy/ui/ontology.py index ec1fe2b7..99afdade 100644 --- a/eddy/ui/ontology.py +++ b/eddy/ui/ontology.py @@ -464,6 +464,7 @@ def __init__(self, session): table.verticalHeader().setSectionsClickable(False) table.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) #table.setSelectionMode(QAbstractItemView.MultiSelection) + connect(table.cellDoubleClicked, self.onAssertionCellDoubleClicked) self.addWidget(table) selectBtn = QtWidgets.QPushButton('Select All', objectName = 'annotation_assertions_selectall_button') @@ -1045,6 +1046,18 @@ def onAnnotationCellClicked(self,row,column): self.widget('ontology_annotations_delete_button').setEnabled(True) self.widget('ontology_annotations_edit_button').setEnabled(True) + @QtCore.pyqtSlot(int, int) + def onAssertionCellDoubleClicked(self, row: int, _col: int) -> None: + table: QtWidgets.QTableWidget = self.widget('annotation_assertions_table_widget') + assertion = table.item(row, 2).data(QtCore.Qt.ItemDataRole.UserRole) + assertionBuilder = AnnotationAssertionBuilderDialog( + self.session, + self.project.ontologyIRI, + assertion, + ) + connect(assertionBuilder.sgnAnnotationAssertionCorrectlyModified, self.redraw) + assertionBuilder.open() + @QtCore.pyqtSlot(bool) def editOntologyAnnotation(self, _): self.widget('ontology_annotations_edit_button').setEnabled(False)