fix(window): Hide All Floating Windows also hides Automation (#253)
This commit is contained in:
parent
df0c4790b7
commit
bff9ca1390
|
|
@ -557,6 +557,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!({})
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
Loading…
Reference in New Issue