diff --git a/ChangeLog b/ChangeLog index 14afde107..974f23554 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,6 @@ 2006-09-09 Don Allingham + * src/DisplayTabs/_EventEmbedList.py: bring up the event reference + editor on drag-n-drop onto the event reference list * src/GrampsDb/_ReadXML.py: remove commented out code * src/Editors/_EditEvent.py: handle overwriting of date text * src/RelLib/_DateBase.py: allow optional dropping of date text on diff --git a/src/DisplayTabs/_EventEmbedList.py b/src/DisplayTabs/_EventEmbedList.py index a8dfffee4..9f8e517a5 100644 --- a/src/DisplayTabs/_EventEmbedList.py +++ b/src/DisplayTabs/_EventEmbedList.py @@ -148,3 +148,18 @@ class EventEmbedList(EmbeddedList): self.get_data().append(ref) self.changed = True self.rebuild() + + def _handle_drag(self, row, obj): + """ + And event reference that is from a drag and drop has + an unknown event reference type + """ + from RelLib import EventRoleType + + obj.set_role((EventRoleType.UNKNOWN,'')) + EmbeddedList._handle_drag(self, row, obj) + + event = self.dbstate.db.get_event_from_handle(obj.ref) + self.get_ref_editor()( + self.dbstate, self.uistate, self.track, + event, obj, self.event_updated)