Merge pull request #277 from marcoarnulfo/fix/hide-floating-automation

fix(window): Hide All Floating Windows also hides Automation (#253)
This commit is contained in:
Brandon Thomas
2026-10-13 04:26:49 -04:00
committed by GitHub
2 changed files with 20 additions and 0 deletions
+1
View File
@@ -561,6 +561,7 @@ pub fn run_ui_command(app: &mut SoundApp, id: &str, p: &Value) -> Option<Result<
app.ui.show_undo_history = false;
app.ui.show_session_info = false;
app.ui.show_audio_health = false;
app.ui.show_automation = false;
app.ui.plugin_windows.clear();
app.ui.audiosuite = None;
json!({})
+19
View File
@@ -0,0 +1,19 @@
use serde_json::json;
use soundcraft_ui_egui::{Services, SoundApp};
#[test]
fn hide_floating_closes_automation() {
let mut app = SoundApp::new(soundcraft_engine::Engine::default(), None, Services::default());
let main_window = app.ui.window;
app.run("window.automation", json!({"value": true})).unwrap();
app.run("window.transport", json!({"value": true})).unwrap();
assert!(app.ui.show_automation && app.ui.show_transport);
app.run("window.hide_floating", json!({})).unwrap();
assert!(!app.ui.show_transport);
assert!(!app.ui.show_automation, "Automation must be hidden");
assert_eq!(app.ui.window, main_window);
app.run("window.automation", json!({"value": true})).unwrap();
assert!(app.ui.show_automation);
}