657 menu.addSeparator() |
657 menu.addSeparator() |
658 |
658 |
659 act = menu.addAction( |
659 act = menu.addAction( |
660 self.tr("Show Source"), lambda: self.__gotoTestDefinition(index) |
660 self.tr("Show Source"), lambda: self.__gotoTestDefinition(index) |
661 ) |
661 ) |
662 act.setEnabled(self.model().data(index, Qt.ItemDataRole.UserRole) is not None) |
662 act.setEnabled( |
|
663 self.model().data(index, Qt.ItemDataRole.UserRole)[0] is not None |
|
664 ) |
663 menu.addSeparator() |
665 menu.addSeparator() |
664 |
666 |
665 menu.addAction(self.tr("Collapse All"), self.collapseAll) |
667 menu.addAction(self.tr("Collapse All"), self.collapseAll) |
666 menu.addAction(self.tr("Expand All"), self.expandAll) |
668 menu.addAction(self.tr("Expand All"), self.expandAll) |
667 |
669 |