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

Scenes changes do not contribute to the Undo stack #863

Open
Fredosixx opened this issue Jan 20, 2023 · 5 comments
Open

Scenes changes do not contribute to the Undo stack #863

Fredosixx opened this issue Jan 20, 2023 · 5 comments

Comments

@Fredosixx
Copy link

Not strictly related to the API, but is there a reason why changes to scenes (create, delete, rename, ....) do not show in the Undo stack (and thus are not undoable), whereas they contribute to modification of the skp file.

If you add a scene, Undo will not show the change, but you will be prompted for Save confirmation if you close the model.

In contrast, changes to Tags/Layers do show in the Undo stack and are undoable.

@DanRathbun
Copy link

RELATED:

The Sketchup::PagesObserver has numerous problems. These may be contributive to not be undoable.

See all the comments in Issue 26 : PagesObserver#onPageUpdate() observer callback

@Fredosixx
Copy link
Author

Still, this does not explain why creating, deleting or renaming a scene cannot be considered as an undoable action...

For the observer, I am aware of the numerous issues and the lack of observer for the most important event: update.

@DanRathbun
Copy link

DanRathbun commented Jan 21, 2023

I would say that the explanation is that the treatment of pages (scenes) in the core is bugged (which spills over into FrameChangeObserver and PagesObserver.)

@thomthom
Copy link
Member

It was a design decision made in the early days of SketchUp. All though the exact details has been lost to time. Been a source of debate even internally.

@DanRathbun
Copy link

DanRathbun commented Jan 23, 2023

Okay. So then, ... would there be a way for coders to force an undo when the actions were wrapped in an operation ?

OR .... perhaps add a undo: true hash argument to these methods (and perhaps others that do a "end around" the undo feature) ?

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

No branches or pull requests

3 participants