Skip to content

Commit 8507f17

Browse files
committed
Add undo_reference and undo_data methods to DbGeneric
1 parent d523929 commit 8507f17

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

gramps/gen/db/generic.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2648,7 +2648,19 @@ def db_has_bm_changes(self):
26482648
def get_undodb(self):
26492649
return self.undodb
26502650

2651-
def undo(self, update_history=True):
2651+
def undo_reference(self, data, handle: AnyHandle):
2652+
"""
2653+
Helper method to undo a reference map entry
2654+
"""
2655+
raise NotImplementedError
2656+
2657+
def undo_data(self, data, handle: AnyHandle, obj_key):
2658+
"""
2659+
Helper method to undo/redo the changes made
2660+
"""
2661+
raise NotImplementedError
2662+
2663+
def undo(self, update_history: bool = True):
26522664
return self.undodb.undo(update_history)
26532665

26542666
def redo(self, update_history=True):

0 commit comments

Comments
 (0)