Comments (7)
Note that commit is different. Commit should effectively set the stack clean rather than clearing it (it should be possible to undo and redo after commit)
from spine-toolbox.
@PiispaH I see what you mean, ideally rollback after commit should reset the index to that commit - although I don't know if that's possible with QUndoStack. I thought setIndex could work: just record the index at commit and then call setIndex with it after rollback - but setIndex calls undo/redo too, which we don't want.
So I believe it's ok to just clear the stack after rollback, even if there are 'commits in the stack' so to say. It's a bit of a corner case anyways? We can leave it like that and see if a user complains (which I doubt).
from spine-toolbox.
Is it supposed to be possible to undo the rollback? When rolling back a db the following warning comes up: "All your changes since the last commit will be reverted and removed from the undo/redo stack."
I got the scenario to show up again by pressing redo after step 4. When it showed up again DB editor thought that the DB didn't have any changes since the last commit and therefore the DB couldn't be committed with the newly added (still uncommitted) scenario. Is the issue here that the undo/redo stack isn't actually getting cleared after the rollback as it states?
from spine-toolbox.
Is the issue here that the undo/redo stack isn't actually getting cleared after the rollback as it states?
Sound like the bug here is exactly that.
from spine-toolbox.
I think you're right @PiispaH - rollback should clear the stack. We are calling setClean() on the stack whereas we should be calling clear() - or something like that.
from spine-toolbox.
@manuelma If changes are made and the db is committed and after that more changes are done after which the DB is rolled back, should the undo/redo stack from the moment of the commit still be available? In other words should the rollback only clear the undo/redo stack from the current state until the latest commit? That way it would be like the changes after the commit and the rollback never happened and it would still be possible to undo/redo changes before the commit. Other way is to just clear the whole stack and undo/redo isn't available after a rollback no matter what.
from spine-toolbox.
Ok, will close this one for now then.
from spine-toolbox.
Related Issues (20)
- Make adding new entities simpler in DB editor HOT 9
- Viewing entities in Entity tree HOT 8
- Allow default alternatives in DB editor HOT 3
- Allow only right dataformat for parameters in DB editor
- Hierarchy of parameters
- Create workflow editor 'user mode'
- 'Manage plugins' window not showing text HOT 1
- Julia Installer wizard does not work in Windows bundle HOT 5
- Bundling SpineOpt and Julia installation inside Toolbox
- Limit the width of items in tree views
- Don't select tree items in db editor when right clicking on them HOT 11
- Traceback when importing in DB editor
- Editing index name in a map does not change the index name
- Selection changes when alternatives are dragged in scenario tree
- Importer not importing entities if not a set number of columns
- the latest dev not working with conda python 3.12
- Two databases open, only entities from another DB show
- Entity groups for N-D entity classes HOT 1
- Toolbox silent exit when refreshing DB
- Activating and deactivating scenario filters in db breaks graph view
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spine-toolbox.