Bugfixes for sectionbox navigator#3261
Conversation
There was a problem hiding this comment.
PR Summary:
This PR fixes three bugs in the Section Box Navigator tool:
- Replaces
ElevationwithProjectElevationthroughout, 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
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Outdated
Show resolved
Hide resolved
...Revit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/sectionbox_navigation.py
Show resolved
Hide resolved
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Show resolved
Hide resolved
...ls.extension/pyRevit.tab/Modify.panel/3D.pulldown/Section Box Navigator.pushbutton/script.py
Show resolved
Hide resolved
…uard as a init has run check
|
📦 New public release are available for 6.3.0.26095+0830 |
Description
Checklist
Before submitting your pull request, ensure the following requirements are met:
pipenv run black {source_file_or_directory}Related Issues
If applicable, link the issues resolved by this pull request: