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

Fix duplicate components after unload & reload of GH #513

Merged
merged 1 commit into from
May 15, 2020

Conversation

adecler
Copy link
Member

@adecler adecler commented May 14, 2020

NOTE: Depends on

BHoM/BHoM_UI#264

Issues addressed by this PR

Closes #504

Grasshopper effectively loads the BHoM plugin multiple times so a simple check on a static boolean doesn't work. Finding teh proper way to remove the event handler when GH was unloaded proved to be tricky so I decided to just ask the event handler to remove pre-existing handles of a specific type (has to be done via string since types are actually not equal between loaded instances)

Everything still works fine if you have multiple instances of GH, even if you unload/reload some of them.

Additional comments

I really really wanted to get my list of bugs down to zero 😋

@adecler adecler added the type:bug Error or unexpected behaviour label May 14, 2020
@adecler adecler added this to the BHoM 3.2 β MVP milestone May 14, 2020
@adecler adecler requested review from pawelbaran and epignatelli May 14, 2020 09:59
@adecler adecler self-assigned this May 14, 2020
Copy link
Member

@pawelbaran pawelbaran left a comment

Choose a reason for hiding this comment

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

The issue is resolved, code also looks fine. LGTM

@adecler
Copy link
Member Author

adecler commented May 15, 2020

/azp run Grasshopper_Toolkit.CheckInstaller

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@adecler adecler merged commit dc82693 into master May 15, 2020
@adecler adecler deleted the Grasshopper_Toolkit-#504-FixEventsAfterReload branch May 15, 2020 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Error or unexpected behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grasshopper_Toolkit: UI bug after restart of Grasshopper
2 participants