Skip to content

Conversation

@yanagiragi
Copy link
Contributor

This PR aims to solve #57 by clear the scene nodes of the viewer each time when the Run button is clicked.

@yungyuc yungyuc added the bug Something isn't working label May 2, 2022
RApplication * app = RApplication::instance();
new RStaticMesh<2>(mesh, app->main()->viewer()->scene());
RScene * scene = app->main()->viewer()->scene();
for (RStaticMesh<2> * child : scene->findChildren<RStaticMesh<2> *>())
Copy link
Member

@yungyuc yungyuc May 2, 2022

Choose a reason for hiding this comment

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

I read about qDeleteAll() for children removal. I keep the loop because I do not know which way is better.

{
delete child;
}
new RStaticMesh<2>(mesh, scene);
Copy link
Member

Choose a reason for hiding this comment

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

The scene variable is already there for the pointer so I reuse it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure. I agree it is better to reuse it.

@yungyuc yungyuc merged commit 9c02459 into solvcon:master May 2, 2022
@yanagiragi yanagiragi deleted the 62-fix-unwanted-overlay branch June 5, 2022 00:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

2 participants