-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Undoing a remove operation after commit does not update Database editor's views #2228
Comments
soininen
added a commit
to spine-tools/Spine-Database-API
that referenced
this issue
Aug 4, 2023
The field needs to be accessed from outside. Re spine-tools/Spine-Toolbox#2228
soininen
added a commit
to spine-tools/Spine-Database-API
that referenced
this issue
Aug 4, 2023
There may be items that are marked both as removed and to-be-removed when undoing remove actions. Re spine-tools/Spine-Toolbox#2228
soininen
added a commit
to spine-tools/Spine-Database-API
that referenced
this issue
Aug 4, 2023
Toolbox needs to know which items were removed when removing them in cascade to be able to fully undo the removal. Re spine-tools/Spine-Toolbox#2228
soininen
added a commit
to spine-tools/Spine-Database-API
that referenced
this issue
Aug 4, 2023
soininen
added a commit
that referenced
this issue
Aug 4, 2023
No functional changes intended. Re #2228
soininen
added a commit
that referenced
this issue
Aug 4, 2023
Committing changes in Database editor does two things that were not taken into account when undoing commands that removed items: - The removed items were replaced in the database cache which made them distinct from the items stored in the undo command - readd/update/remove callbacks from the new items were removed which prevented fetch parents from being notified that the items were readded On readd, SpineDBWorker now gets the real cache item to work with. It also rebinds the callbacks if necessary before actually readding the item back. Re #2228
soininen
added a commit
that referenced
this issue
Aug 4, 2023
Database items are physically gone from the database after committing, so RemoveItemsCommand needs to know all removed items and their types, not just the one user selected for removal. This information is now propagated to RemoveItemsCommand from spinedb_api upon commit. Re #2228
soininen
added a commit
that referenced
this issue
Aug 4, 2023
AddItemsCommand should not readd items in cascade when redoing. This fixes the command adding items that were not originally added when the command was created. Re #2228
This was referenced Aug 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce in Database editor:
The removed object and the removed relationships do not reappear in the corresponding tree views and the editor is left in an inconsistent state that may lead to crash if it is used for further modifications. Committing the undo action will add the object back to the database but not the relationships.
The text was updated successfully, but these errors were encountered: