-
Notifications
You must be signed in to change notification settings - Fork 134
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
When removing a style through Style Editor and clicking on cancel the change is not undone #198
Comments
If we had the transactions defined, then yes. We could use a rollback. We don't have the transactions defined right now. I am trying, but it is slow and tedious work. For the record, Database::remove mostly toggles the deleted flag to "true" on whatever you deleted. There are a few exceptions to that rule, but it holds for every BeerXML item. You could, if the delete was a really bad mistake, simply open the database and flip the flag back to false. Yes. Cancelling the change should likely undo that, but it will take me some work to figure out how. It won't be enough to do just one. If you delete multiple elements from the interface, I will need to undelete all of them. Perhaps it would be easier to just disable that delete button? If you want to delete things, use the trees? |
Oh, I see. Thank you for the explanation. Thanks :) |
It may be working as designed, but if this confused or surprised you then Until then, I would rather keep this open. It will help remind me that this Mik
|
To answer the question
No...at least not built into the language. SQLite allows rollbacks, but only basically for errors that happen in the middle of a transaction. If you want a higher-level rollback, you would have to implement it yourself. That's pretty much what I tried at one point with |
About the undo feature, do you think it is a good idea to keep a FIFO of the inverted database request so that you just have to execute this request at every undo action triggered ? For example if the commande is to delete an ingredient from the database, we need to store the command that create that exacte same ingredient we've just removed. |
I think this was resolved in #499, closing |
Hi,
I was playing arround and found the following behavior:
Result: It won't be available.
I know that after closing BrewTarget it asks if I want keep the changes etc, but if I regret deleting that style, is there a way back?
Is this a "as designed" behavior?
The cancel button aparrently only hides the dialog
And the remove button directly deletes a style from DB
I know almost nothing about sql, but isn't there a way to roolback the changes if the user hits the Cancel button?
The text was updated successfully, but these errors were encountered: