FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Bonsai: clear stale linked element queries on unload by john-rogers · Pull Request #9323 · IfcOpenShell/IfcOpenShell · GitHub

Bonsai: clear stale linked element queries on unload - #9323

Draft
john-rogers wants to merge 1 commit into
IfcOpenShell:v0.8.0from
john-rogers:fix/clear-linked-query-on-unload
Draft

Bonsai: clear stale linked element queries on unload#9323
john-rogers wants to merge 1 commit into
IfcOpenShell:v0.8.0from
john-rogers:fix/clear-linked-query-on-unload

Conversation

john-rogers commented Aug 17, 2026
edited
Loading

Copy link
Copy Markdown

Summary

  • Clear queried linked-element state when unloading the link that supplied it.
  • Preserve valid queried-element state when unloading a different link.
  • Add regression coverage for both behaviours.

Fixes #9322.

Root cause

UnloadLink removed the linked geometry but did not clear the associated queried-object properties or cached LinksData.linked_data. The Links panel could therefore continue displaying the identity of an element from an unloaded link. Reloading a link inherited the same problem because it uses the unload lifecycle internally.

User impact

After Unload Link or Reload Link, the Links panel no longer presents stale element identification. Query data belonging to another loaded link remains intact.

Validation

  • Manual reproduction confirmed with Bonsai 0.8.6-alpha260808 (0a51ebd), Blender 5.1.2 and Debian Linux.
  • Patch based on bonsai-0.8.6-alpha2608132105 (1af5cc9).
  • git diff --check: passed.
  • Python compilation check: passed.
  • Local Black check on the two changed files: passed unchanged.
  • Ruff check: passed.
  • GitHub Actions ci/compile-and-test: passed.
  • The Blender regression tests were not run locally because the full pytest-blender development environment was unavailable.

CI baseline note

The GitHub Actions ci-lint/lint-formatting job currently fails because psf/black@stable installed Black 26.5.1 and flagged these three pre-existing files from the unchanged v0.8.0 base:

  • src/ifcopenshell-python/test/api/alignment/test_create.py
  • src/ifcopenshell-python/ifcopenshell/util/unit.py
  • src/ifcopenshell-python/test/api/alignment/test_referent_names.py

None of these files is modified by this PR. Syntax checking, Ruff and both ty checks within the lint job passed. No unrelated formatting changes have been added to this patch.

AI assistance disclosure

The diagnosis, patch, regression tests and pull-request text were developed with OpenAI Codex/ChatGPT under the contributor's direction. The contributor reviewed the changes and performed the reported manual validation.

Clear queried-element UI state only when unloading its source link,
while preserving valid queries from other links. Add focused
regression coverage for both behaviours.

Generated with the assistance of an AI coding tool (OpenAI Codex),
under jr's direction and manual validation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

1 participant


Back | FazBrowse Home | New Git URL