viewer: 슬라이더 자동적용 제거 — Apply 버튼 명시적 클릭만
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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("✓ 최신 상태");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user