From 5e1bfce004228ab3e97760f4a23e98834fd53044 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Sat, 9 Sep 2006 22:46:14 +0000 Subject: [PATCH] * src/DisplayTabs/_EventEmbedList.py: bring up the event reference editor on drag-n-drop onto the event reference list svn: r7307 --- ChangeLog | 2 ++ src/DisplayTabs/_EventEmbedList.py | 15 +++++++++++++++ 2 files changed, 17 insertions(+) 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)