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

fromVariantMap() called twice on all plugins #540

Open
JulianThijssen opened this issue Mar 11, 2024 · 0 comments
Open

fromVariantMap() called twice on all plugins #540

JulianThijssen opened this issue Mar 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@JulianThijssen
Copy link
Contributor

@ChangLi27 noticed that when loading a project, for every plugin in the workspace their fromVariantMap() function is called twice.

We traced it back to a bug in the ViewPluginDockWidget.cpp
image

The last constructor is called, which in turn calls the first constructor via the ViewPluginDockWidget() in the initializer list. Both of these constructors add the widget to the active list, which is processed later when loading the workspace and calls fromVariantMap() on each of them.

The issue was fixed by removing the active << this; in the first constructor, but probably this is not the best solution.

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
None yet
Development

No branches or pull requests

2 participants