From 257630f64bf2efb255cf6463d51e81967d780614 Mon Sep 17 00:00:00 2001 From: minsung Date: Tue, 14 Apr 2026 20:51:13 +0900 Subject: [PATCH] =?UTF-8?q?viewer:=20=EC=8A=AC=EB=9D=BC=EC=9D=B4=EB=8D=94?= =?UTF-8?q?=20=EC=9E=90=EB=8F=99=EC=A0=81=EC=9A=A9=20=EC=A0=9C=EA=B1=B0=20?= =?UTF-8?q?=E2=80=94=20Apply=20=EB=B2=84=ED=8A=BC=20=EB=AA=85=EC=8B=9C?= =?UTF-8?q?=EC=A0=81=20=ED=81=B4=EB=A6=AD=EB=A7=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- cimery/crates/viewer/src/lib.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cimery/crates/viewer/src/lib.rs b/cimery/crates/viewer/src/lib.rs index f53df9b..a80d866 100644 --- a/cimery/crates/viewer/src/lib.rs +++ b/cimery/crates/viewer/src/lib.rs @@ -429,13 +429,12 @@ impl RenderState { ui.heading("교량 속성"); ui.separator(); - // Helper: slider that auto-applies on drag release macro_rules! param_slider { ($label:expr, $val:expr, $range:expr, $step:expr) => {{ ui.label($label); - let r = ui.add(egui::Slider::new($val, $range).step_by($step)); - if r.drag_released() || r.lost_focus() { apply = true; dirty = true; } - if r.changed() { dirty = true; } + if ui.add(egui::Slider::new($val, $range).step_by($step)).changed() { + dirty = true; + } }}; } @@ -446,11 +445,9 @@ impl RenderState { param_slider!("슬래브 두께(mm)",&mut p.slab_thickness, 150.0..=400.0, 10.0); ui.separator(); - if dirty && !apply { - // Manual apply button as fallback + if dirty { if ui.button("▶ 적용 (Apply)").clicked() { apply = true; } - ui.small("* 슬라이더를 놓으면 자동 적용"); - } else if !dirty { + } else { ui.label("✓ 최신 상태"); }