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

Support update of root object type #119

Merged
merged 1 commit into from
Jun 26, 2022
Merged

Support update of root object type #119

merged 1 commit into from
Jun 26, 2022

Conversation

sonnyp
Copy link
Contributor

@sonnyp sonnyp commented Jun 26, 2022

Fixes #59

When the new UI code would change the type of the root object - simply destroy the previous one and set the new root object.

From a UX perspective

If the previous object was a GtkRoot - the window is closed
If the new object isn't a GtkRoot - the new object is directly previewed in Workbench window
If the new object is a GTKRoot - user simply has to click on the primary button "Show Preview Window"

Comment on lines +81 to +88
} else if (
object_root.constructor.$gtype !== object_preview.constructor.$gtype
) {
object_root.destroy();
setObjectRoot(object_preview);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lw64 that's all there is to do

@sonnyp sonnyp merged commit 4389f48 into main Jun 26, 2022
@sonnyp sonnyp mentioned this pull request Jun 26, 2022
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Preview change of object root type
1 participant