511 def __edit(self): |
511 def __edit(self): |
512 """ |
512 """ |
513 Private slot to handle the Edit context menu action. |
513 Private slot to handle the Edit context menu action. |
514 """ |
514 """ |
515 itm = self.currentItem() |
515 itm = self.currentItem() |
516 if isinstance(itm, TemplateEntry): |
516 editGroup = not isinstance(itm, TemplateEntry) |
517 editGroup = False |
|
518 else: |
|
519 editGroup = True |
|
520 |
517 |
521 from .TemplatePropertiesDialog import TemplatePropertiesDialog |
518 from .TemplatePropertiesDialog import TemplatePropertiesDialog |
522 dlg = TemplatePropertiesDialog(self, editGroup, itm) |
519 dlg = TemplatePropertiesDialog(self, editGroup, itm) |
523 if dlg.exec() == QDialog.DialogCode.Accepted: |
520 if dlg.exec() == QDialog.DialogCode.Accepted: |
524 if editGroup: |
521 if editGroup: |