web: add Show DBU toggle to View menu#10618
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for displaying Database Units (DBU) instead of microns across the web interface, including the coordinate bar, scale bar, rulers, hierarchy browser, and inspector panel. It adds a 'Show DBU' toggle in the menu bar and implements a C++ RAII helper ScopedDbuFormat to handle DBU-to-micron formatting on the server side. Feedback on the changes highlights a potential issue where the scale bar could display '0' when zoomed in extremely close, and suggests capping the minimum DBU value to 1.
|
@codex review |
Add a "Show DBU" option in the web UI's View menu, mirroring the Qt GUI's Options > Show DBU toggle. When enabled, coordinates and dimensions display as raw database units instead of microns. The setting defaults to off (microns) matching the Qt GUI and persists between sessions via the or_show_dbu cookie. Affected display areas: - Coordinate bar (mouse position) - Scale bar (zoom distance reference) - Ruler labels and inspector properties - Inspector BBox/Point properties for all selected objects - Hierarchy browser area column Server side: add ScopedDbuFormat RAII helper that temporarily sets Descriptor::Property::convert_dbu to a micron-aware formatter (matching the Qt GUI's convertDBUToString) for the scope of each inspect request. The client passes use_dbu in requests so the server formats property values accordingly. Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3f4caa6160
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
ScopedDbuFormatRAII helper temporarily setsDescriptor::Property::convert_dbuto a micron-aware formatter for each inspect request, controlled by ause_dbuflag from the client.