Skip to content
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

Undo/Redo unexpected behavior after importing from file #1487

Open
4 tasks done
SquidXTV opened this issue Mar 21, 2024 · 3 comments
Open
4 tasks done

Undo/Redo unexpected behavior after importing from file #1487

SquidXTV opened this issue Mar 21, 2024 · 3 comments
Labels

Comments

@SquidXTV
Copy link

Before submitting your bug report, please check the following:

  • I've definitely found a bug (it you're not sure, please use image.sc instead)
  • I've checked https://qupath.github.io for a new release that might already have fixed the issue
  • I've checked the Changelog to see if the bug has already been fixed in the next release
  • I've checked for existing GitHub issues describing the same problem

Bug report

Describe the bug
If you import objects from a file, then select an object like a rectangle and change/move it and then finally using
undo it weirdly going to delete all added objects instead of undoing the change/move.

To Reproduce
Steps to reproduce the behavior:

  1. Loading image using Open...
  2. Loading objects using Import objects from file
  3. Double click (select) any object
  4. Move/Change the selected object, like transforming a rectangle or whatever
  5. Undoing the action

Expected behavior
Undoing the move/change of the object.
Instead it just deletes all objects.

Desktop (please complete the following information):

  • OS: Windows
  • QuPath Version: 0.5.1
@SquidXTV SquidXTV added the bug label Mar 21, 2024
@SquidXTV
Copy link
Author

I also noticed that if you just do the first two steps (loading image and objects) that you won't be able to undo loading the objects anyway. The undo action gets available after doing something else, even selecting and deleting an object.

Pretty weird to me, where is that undo action coming from? It is unrelated to actions later. I think it is storing a state with no objects at all somewhere.

@petebankhead
Copy link
Member

QuPath's undo support is pretty bad - I spoke about it recently in this video: https://youtu.be/zFTnfv_XWg4?t=41

Fixing it properly will likely involve making some scarily-large changes to the core behavior, but we'll explore whether it can be made less bad in this specific scenario.

@SquidXTV
Copy link
Author

SquidXTV commented Mar 21, 2024

Ah I see.

[..] but we'll explore whether it can be made less bad in this specific scenario.

No need for me specifically, I just noticed that issue, but it seems to be a larger issue with the current implementation anyway.

Thanks for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants