Skip to content

Bugfixes for sectionbox navigator#3261

Merged
jmcouffin merged 5 commits intopyrevitlabs:developfrom
Wurschdhaud:fix-issue-3243
Apr 5, 2026
Merged

Bugfixes for sectionbox navigator#3261
jmcouffin merged 5 commits intopyrevitlabs:developfrom
Wurschdhaud:fix-issue-3243

Conversation

@Wurschdhaud
Copy link
Copy Markdown
Contributor

Description

  • use projectelevation instead of elevation
  • update levels/grids when switching doc
  • disable invalid levels in level menu

Checklist

Before submitting your pull request, ensure the following requirements are met:

  • Code follows the PEP 8 style guide.
  • Code has been formatted with Black using the command:
    pipenv run black {source_file_or_directory}
  • Changes are tested and verified to work as expected.

Related Issues

If applicable, link the issues resolved by this pull request:

Copy link
Copy Markdown
Contributor

@devloai devloai bot left a comment

Choose a reason for hiding this comment

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

PR Summary:

This PR fixes three bugs in the Section Box Navigator tool:

  • Replaces Elevation with ProjectElevation throughout, ensuring correct elevation values in linked model / survey-point setups
  • Refreshes levels and grids when switching documents
  • Disables invalid levels in the dropdown menu (e.g. a "top" level below the current bottom)

Review Summary:

The ProjectElevation substitution is the right fix and is applied consistently across both files. The doc-switch refresh logic is a good addition, but its placement inside the autoupdate guard introduces a regression for users with autoupdate disabled — stale doc, length_unit, grids, and levels will persist after a document switch. The removal of the explicit current_view refresh in btn_align_box_to_view_click is also a latent bug for the same autoupdate-off scenario. One IronPython WPF convention (explicit Nullable<bool> comparison) was flagged per repository standards. A pre-existing type() proxy pattern was noted as a minor code smell while the code is being touched.

Suggestions

  • Add a unit test or manual test case covering document switch with autoupdate disabled to catch the stale-globals regression. Apply
  • Audit all other button click handlers that reference self.current_view to ensure they refresh via revit.active_view when autoupdate may be off. Apply

@jmcouffin jmcouffin merged commit 1b2d961 into pyrevitlabs:develop Apr 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 5, 2026

📦 New public release are available for 6.3.0.26095+0830

@Wurschdhaud Wurschdhaud deleted the fix-issue-3243 branch April 5, 2026 08:58
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.

[Bug]: Section Box Navigator

2 participants