fix: stabilize client box overlay and selection outline#195
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughTwo viewport-centric rendering updates in ChangesViewport Rendering Updates
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 Infer (1.2.0)source/map_drawer.cppIn file included from source/map_drawer.cpp:18: ... [truncated 2200 characters] ... ntend_decl_funct.add_method.f in file "src/clang/cFrontend_decl.ml", line 48, characters 12-91 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors the drawing logic in MapDrawer::DrawIngameBox and MapDrawer::DrawSelectionBox to center elements relative to the viewport, clamp selection coordinates, and scale line rendering with zoom. The reviewer suggests using standard std::clamp instead of manual ternary operators or custom lambdas. Additionally, they recommend removing the unnecessary static intermediate lines array in DrawSelectionBox and directly initializing the verts array to improve thread safety, performance, and readability.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
d75dbf0 to
d69a346
Compare
|



Summary
Fix two long-standing rendering issues in editor overlays:
Details
Client box overlay
Selection dashed outline
Files changed
HOW TO TEST
Client box
View -> Show client box.Selection outline
Shiftand drag a selection rectangle.Summary by CodeRabbit