def prompt_rename(self):
text, good = QInputDialog.getText(self.app.view, ' ', 'Rename this field:', text=self.text(0).strip('+ '))
if text:
if not match('^[a-zA-Z0-9_]+$', text):
QMessageBox.warning(self.app.view, ' ', 'This is not a valid alphanumeric name.')
self.prompt_rename()
else:
try:
if self.do_rename(text):
return
except Exception:
pass
QMessageBox.warning(self.app.view, ' ', 'Field was not found in .proto, did you edit it elsewhere?')
评论列表
文章目录