(self, event)
| 112 | return False |
| 113 | |
| 114 | def OnCopy(self, event): |
| 115 | with TextEntryValidatedDialog( |
| 116 | self, self.validator, "Enter a name for your {} copy:".format(self.entityName), |
| 117 | "Copy {}".format(self.entityName) |
| 118 | ) as dlg: |
| 119 | active = self.getActiveEntity() |
| 120 | dlg.SetValue("{} Copy".format(active.name)) |
| 121 | dlg.txtctrl.SetInsertionPointEnd() |
| 122 | dlg.CenterOnParent() |
| 123 | |
| 124 | if dlg.ShowModal() == wx.ID_OK: |
| 125 | copy = self.DoCopy(active, dlg.txtctrl.GetValue().strip()) |
| 126 | self.refreshEntityList(copy) |
| 127 | wx.PostEvent(self.entityChoices, wx.CommandEvent(wx.wxEVT_COMMAND_CHOICE_SELECTED)) |
| 128 | |
| 129 | def OnRename(self, event): |
| 130 | with TextEntryValidatedDialog( |
nothing calls this directly
no test coverage detected