Fix OK lost while a joint animates; Browser Joints folder inside the root component
Clicking OK during the Joint dialog's motion animation was lost about half the time: the preview's busy spinner came and went in the dialog footer between frames, shifting the automatic ids of OK and Cancel, so a click pressed in one frame and released in the next landed on two different ids. The spinner's place is now always taken. Reproduced through the control channel (6 of 14 OK clicks at different animation phases lost before, 0 of 14 after) and covered by a test that presses OK with the preview busy and releases it once idle. The Joints folder is drawn by component_rows for the root, after its folders (as agreed with solvecraft-shell). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
bdc15d2204
commit
62dbf60eb2
4 files changed
+53
-5
No files matched your search
@@ -433,7 +433,6 @@ pub fn browser(app: &mut SolveApp, ui: &mut egui::Ui) {
|
||||
.show(ui, |ui| {
|
||||
ui.spacing_mut().item_spacing.y = 0.0;
|
||||
component_rows(app, ui, 0, 0, &mut acts);
|
||||
crate::dialogs_assembly::browser_joints(app, ui);
|
||||
});
|
||||
});
|
||||
app.viewport.hover_bodies = acts.hover_bodies;
|
||||
@@ -535,6 +534,9 @@ fn component_rows(app: &mut SolveApp, ui: &mut egui::Ui, id: u64, depth: usize,
|
||||
for folder in ["bodies", "sketches", "construction"] {
|
||||
folder_rows(app, ui, id, folder, d, acts);
|
||||
}
|
||||
if id == 0 {
|
||||
crate::dialogs_assembly::browser_joints(app, ui, d);
|
||||
}
|
||||
let children: Vec<u64> = app.session.doc.components.iter().filter(|c| c.parent == id).map(|c| c.id).collect();
|
||||
for c in children {
|
||||
component_rows(app, ui, c, d, acts);
|
||||
|
||||
Reference in new issue
Block a user