Coder Social home page Coder Social logo

Comments (7)

manuelma avatar manuelma commented on June 29, 2024 1

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.

manuelma avatar manuelma commented on June 29, 2024 1

@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.

PiispaH avatar PiispaH commented on June 29, 2024

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.

soininen avatar soininen commented on June 29, 2024

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.

manuelma avatar manuelma commented on June 29, 2024

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.

PiispaH avatar PiispaH commented on June 29, 2024

@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.

PiispaH avatar PiispaH commented on June 29, 2024

Ok, will close this one for now then.

from spine-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.