Skip to content

Commit

Permalink
Merge branch 'main' into xiyu/console
Browse files Browse the repository at this point in the history
  • Loading branch information
mxgrey authored Jul 7, 2023
2 parents 3ccac6d + b5b5ab6 commit 32ab222
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/style.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ jobs:

- name: rustfmt
run: |
rustup toolchain install nightly
rustup default nightly
rustup component add rustfmt
- name: style
Expand Down
10 changes: 8 additions & 2 deletions rmf_site_editor/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@

use bevy::{prelude::*, tasks::AsyncComputeTaskPool};
use rfd::AsyncFileDialog;
use std::collections::BTreeMap;
use std::path::PathBuf;

use crate::interaction::InteractionState;
use crate::site::LoadSite;
use crate::workcell::LoadWorkcell;
use crate::AppState;
use rmf_site_format::legacy::building_map::BuildingMap;
use rmf_site_format::{Site, SiteProperties, Workcell};
use rmf_site_format::{Level, Site, SiteProperties, Workcell};

use crossbeam_channel::{Receiver, Sender};

Expand Down Expand Up @@ -137,8 +138,13 @@ pub fn dispatch_new_workspace_events(
error!("DEV ERROR: Sent generic change workspace while in main menu");
}
AppState::SiteEditor => {
let mut levels = BTreeMap::new();
levels.insert(0, Level::default());
load_site.send(LoadSite {
site: Site::default(),
site: Site {
levels,
..default()
},
focus: true,
default_file: None,
});
Expand Down
2 changes: 1 addition & 1 deletion rmf_site_format/src/level.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ impl Default for LevelProperties {
}
}

#[derive(Serialize, Deserialize, Debug, Clone)]
#[derive(Serialize, Deserialize, Debug, Clone, Default)]
pub struct Level {
pub properties: LevelProperties,
pub anchors: BTreeMap<u32, Anchor>,
Expand Down

0 comments on commit 32ab222

Please sign in to comment.