-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Recently I made a change so if an external source commits to a DB that is open in DB editor, then the entire mapping is reset and the editor is refreshed. Maybe that change predates this one spine-tools/Spine-Toolbox#2353 by @soininen .
I guess I am coming from a bit different perspective, where the user has dirty (uncommitted) changes in their undo stack and then an external commit happens. If the external commit is adding items that conflict with the user uncommitted changes and then the user attempts to commit, it may be chaos.
So to avoid any complications, I made it so whenever an external commit happens (and is notified to toolbox by the source) I really reset the mapping and the user loses everything.
But if the user doesn't have any changes and the external commit just adds new data, then this solution is perfect. So I don't know, maybe we need to work on a more comprehensive solution for conflict resolution, where we really calculate the difference between the newest contents of the DB and the DatabaseMapping, and ask the user to solve?