Viewport: the analysis legend stays above the floating History card again

9a7958857 (placing the model returns its error) passed the legend the whole viewport rect
instead of the bottom overlay rect that clears the floating History card, and slid the
placement note's doc comment in between the legend's comment and its function. The legend is
laid out in the overlay rect again, as the frame rate readout is, and each function has its
own comment back (bottom_readouts_clear_floating_history_on_the_first_frame).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jyviko
2026-10-28 22:27:39 -04:00
committed by Irakli Kourtis
parent b3dfcf1ff2
commit 367beae69f
+4 -4
View File
@@ -2642,9 +2642,6 @@ fn analysis_uniform(app: &SolveApp) -> [f32; 8] {
solidcraft_gpu::view::analysis_uniform(app.session.analysis.map(|a| a.mode()), crate::access::map(app).as_ref())
}
/// While Draft, Accessibility or Curvature Map analysis is on, what each of its colours means and
/// the values it stands for, at the bottom left of the viewport (#973). The colours alone don't
/// say, and with colour vision loss they can be hard to tell apart.
/// Why the model cannot be placed, across the bottom of the viewport, while it cannot: the
/// viewport then shows no placed bodies (see `open_meshing::session_world`).
fn placement_note(app: &SolveApp, painter: &egui::Painter, rect: Rect) {
@@ -2654,6 +2651,9 @@ fn placement_note(app: &SolveApp, painter: &egui::Painter, rect: Rect) {
painter.text(pos2(rect.center().x, rect.bottom() - 24.0), Align2::CENTER_BOTTOM, text, FontId::proportional(t.font_button), t.error);
}
/// While Draft, Accessibility or Curvature Map analysis is on, what each of its colours means and
/// the values it stands for, at the bottom left of the viewport (#973). The colours alone don't
/// say, and with colour vision loss they can be hard to tell apart.
fn analysis_legend(app: &SolveApp, painter: &egui::Painter, rect: Rect) {
use solidcraft_engine::SurfaceAnalysis as A;
let t = Tokens::get();
@@ -3967,7 +3967,7 @@ pub fn show(app: &mut SolveApp, ui: &mut egui::Ui) {
painter.add(egui_wgpu::Callback::new_paint_callback(rect, cb));
}
let overlay_rect = crate::shell::bottom_overlay_rect(app, rect);
analysis_legend(app, &painter, rect);
analysis_legend(app, &painter, overlay_rect);
placement_note(app, &painter, overlay_rect);
crate::frame_rate::paint(app, ui, &painter, overlay_rect);