chore: Save layout.json to target/layout.json.
This commit is contained in:
parent
d701baed28
commit
5630154590
1 changed files with 2 additions and 2 deletions
|
|
@ -183,12 +183,12 @@ impl StoryWorkspace {
|
|||
fn save_state(state: &DockAreaState) -> Result<()> {
|
||||
println!("Save layout...");
|
||||
let json = serde_json::to_string_pretty(state)?;
|
||||
std::fs::write("layout.json", json)?;
|
||||
std::fs::write("target/layout.json", json)?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn load_layout(dock_area: View<DockArea>, cx: &mut WindowContext) -> Result<()> {
|
||||
let fname = "layout.json";
|
||||
let fname = "target/layout.json";
|
||||
let json = std::fs::read_to_string(fname)?;
|
||||
let state = serde_json::from_str::<DockAreaState>(&json)?;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue