Hack to allow re-opening of the draft
authorEd Page <eopage@byu.net>
Wed, 24 Nov 2010 03:48:06 +0000 (21:48 -0600)
committerEd Page <eopage@byu.net>
Wed, 24 Nov 2010 03:48:06 +0000 (21:48 -0600)
src/session.py

index 58f1b39..39c146c 100644 (file)
@@ -67,7 +67,11 @@ class Draft(QtCore.QObject):
                le.start()
 
        def add_contact(self, contactId, title, description, numbersWithDescriptions):
-               assert contactId not in self._contacts
+               if contactId in self._contacts:
+                       _moduleLogger.info("Adding duplicate contact %r" % contactId)
+                       # @todo Remove this evil hack to re-popup the dialog
+                       self.recipientsChanged.emit()
+                       return
                contactDetails = _DraftContact(title, description, numbersWithDescriptions)
                self._contacts[contactId] = contactDetails
                self.recipientsChanged.emit()