ui: mesh.plan.apply, mesh.cells and geometry.partition run as jobs (#545)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-17 08:12:04 -04:00
1 parent b5f71612af
commit 2729511cb5
2 files changed
+70 -9

No files matched your search

+16 -8
View File
@@ -904,6 +904,21 @@ impl ModelApp {
self.dialog = Some(dialog);
}
/// The open form's command succeeded (here or as a job): a definition it made is the
/// selection, its properties in the panel, and the form closes (back to the form it was
/// opened from, if any).
pub(crate) fn form_done(&mut self) {
if let Some(d) = &self.dialog
&& let Some(kind) = browser::Def::ALL.into_iter().find(|k| k.command("create") == d.command)
&& let Ok(params) = serde_json::from_str::<Value>(&d.text)
&& let Some(name) = params.get("name").and_then(Value::as_str)
&& kind.exists(&self.session.model, name)
{
self.selected = Some((kind, name.to_string()));
}
self.dialog_done();
}
/// Run the open parameter form; it closes when the command succeeds.
pub fn run_dialog(&mut self) -> Result<Value, String> {
let (command, params) = self.dialog_params()?;
@@ -922,16 +937,9 @@ impl ModelApp {
}
return Err(message);
}
let made = params.get("name").and_then(Value::as_str).map(str::to_string);
match self.run_form(command, params, true) {
Ok(v) => {
// A definition made in its form is the selection, its properties in the panel.
if let (Some(kind), Some(name)) = (browser::Def::ALL.into_iter().find(|k| k.command("create") == command), made)
&& kind.exists(&self.session.model, &name)
{
self.selected = Some((kind, name));
}
self.dialog_done();
self.form_done();
Ok(v)
}
Err(Failure { message, refused }) => {