Fix #8793 (Unhandled exception: AttributeError:'MessageBox' object has no attribute 'ctc_button')

This commit is contained in:
Kovid Goyal 2011-02-06 09:06:49 -07:00
parent c2574b862a
commit 28cba375fd

View File

@ -89,7 +89,8 @@ class MessageBox(QDialog, Ui_Dialog):
(__version__, unicode(self.windowTitle()),
unicode(self.msg.text()),
unicode(self.det_msg.toPlainText())))
self.ctc_button.setText(_('Copied'))
if hasattr(self, 'ctc_button'):
self.ctc_button.setText(_('Copied'))
def showEvent(self, ev):
ret = QDialog.showEvent(self, ev)