Workspaces: leaving Learn closes its tutorials (#272)
The Learn workspace opens the Home screen on its Learn tab, but no other workspace closed it, so after Learn the tutorials stayed over Default, Review and the rest until a project was created or Home was toggled. It wasn't about clicking quickly: any switch away from Learn kept them. Leaving Learn for another workspace now closes the Home screen it opened. Test: ui_panels leaving_the_learn_workspace_closes_its_tutorials (clicks through the workspace tabs: the Home screen and the tutorials show only on Learn). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
11f3736025
commit
02c75fcaf1
@@ -383,16 +383,21 @@ impl EffectcraftApp {
|
||||
}
|
||||
|
||||
pub fn set_workspace(&mut self, name: &str) {
|
||||
self.ui.workspace = name.to_string();
|
||||
self.ui.dock = self.ui.saved_workspaces.get(name).cloned().unwrap_or_else(|| dock::workspace(name));
|
||||
self.ui.floating = self.ui.saved_floating.get(name).cloned().unwrap_or_else(|| dock::workspace_floating(name));
|
||||
self.ui.maximized = None;
|
||||
// Learn: the Home screen's Learn tab (tutorials) in the Composition panel.
|
||||
// Learn: the Home screen's Learn tab (tutorials) in the Composition panel. Leaving it for
|
||||
// another workspace closes the Home screen again: it stayed over every workspace until a
|
||||
// project was created (#272).
|
||||
if name == "Learn" {
|
||||
self.ui.start_screen = true;
|
||||
self.ui.home_learn = true;
|
||||
self.ui.home_templates = false;
|
||||
} else if self.ui.workspace == "Learn" {
|
||||
self.ui.start_screen = false;
|
||||
self.ui.home_learn = false;
|
||||
}
|
||||
self.ui.workspace = name.to_string();
|
||||
self.ui.dock = self.ui.saved_workspaces.get(name).cloned().unwrap_or_else(|| dock::workspace(name));
|
||||
self.ui.floating = self.ui.saved_floating.get(name).cloned().unwrap_or_else(|| dock::workspace_floating(name));
|
||||
self.ui.maximized = None;
|
||||
}
|
||||
|
||||
/// Built-in workspaces followed by the saved ones (Window ▸ Workspace ▸ Save as New Workspace).
|
||||
|
||||
Reference in New Issue
Block a user