Live preview: the tool alone, the boolean only on OK, computed off the window thread (#1201)

The preview builds only the tool; the boolean runs once on OK, off the window thread, with a Computing label while it takes a while. Follow-up to #1020.
This commit is contained in:
phanoob authored and GitHub committed 2026-10-14 19:31:29 -04:00
1 parent a261aaa841
commit 9935133b56
12 files changed
+343 -136

No files matched your search

+8
View File
@@ -1444,6 +1444,10 @@ fn hit_candidate(app: &SolveApp, h: &Hit) -> Option<(Hit, Sel)> {
/// A pick for the open dialog's active input (a click, or a Select Other row).
pub(crate) fn dialog_pick(app: &mut SolveApp, hit: &Hit, sel: Sel) {
// While OK computes, the dialog's inputs hold.
if app.applying.is_some() {
return;
}
let Some(mut d) = app.dialog.take() else { return };
d.pick(&app.session, sel);
if let crate::dialogs::Kind::PathPlane { sketch, .. } = &mut d.kind {
@@ -2730,6 +2734,10 @@ pub(crate) fn measurement_selection(s: &solidcraft_engine::Session, sel: &Sel) -
/// active input takes (edges, faces or bodies), otherwise bodies.
fn box_select(app: &mut SolveApp, proj: &Proj, bx: BoxSel, add: bool) {
use crate::selection::{BODIES, EDGES, FACES, PROFILES};
// While OK computes, the dialog's inputs hold.
if app.applying.is_some() {
return;
}
let st = app.session.world_state();
let mut out: Vec<Sel> = Vec::new();
let to2 = |pts: &[Vec3]| -> Vec<Pos2> { pts.iter().filter_map(|p| proj.to_screen(*p)).collect() };