diff --git a/rmf_site_editor/src/site/recall_plugin.rs b/rmf_site_editor/src/site/recall_plugin.rs index 12f470c5..412eb990 100644 --- a/rmf_site_editor/src/site/recall_plugin.rs +++ b/rmf_site_editor/src/site/recall_plugin.rs @@ -19,6 +19,10 @@ use crate::site::SiteUpdateSet; use bevy::prelude::*; use rmf_site_format::Recall; +/// The set in which all [`RecallPlugin`]s run. +#[derive(Debug, Hash, PartialEq, Eq, Clone, SystemSet)] +pub struct UpdateRecallSet; + #[derive(Default)] pub struct RecallPlugin where @@ -37,7 +41,8 @@ where ( add_recaller::.after(SiteUpdateSet::ProcessChanges), update_recaller::.after(SiteUpdateSet::ProcessChanges), - ), + ) + .in_set(UpdateRecallSet), ); } } diff --git a/rmf_site_editor/src/widgets/inspector/inspect_model_description/inspect_robot_properties.rs b/rmf_site_editor/src/widgets/inspector/inspect_model_description/inspect_robot_properties.rs index 36c72e0d..5c770b96 100644 --- a/rmf_site_editor/src/widgets/inspector/inspect_model_description/inspect_robot_properties.rs +++ b/rmf_site_editor/src/widgets/inspector/inspect_model_description/inspect_robot_properties.rs @@ -18,8 +18,9 @@ use super::{get_selected_description_entity, ModelDescriptionInspector, ModelPropertyQuery}; use crate::{ site::{ - update_model_instances, Change, ChangePlugin, Group, IssueKey, ModelMarker, ModelProperty, - NameInSite, Recall, RecallPlugin, Robot, SiteUpdateSet, + recall_plugin::UpdateRecallSet, update_model_instances, Change, ChangePlugin, Group, + IssueKey, ModelMarker, ModelProperty, NameInSite, Recall, RecallPlugin, Robot, + SiteUpdateSet, }, widgets::{prelude::*, Inspect}, AppState, Issue, ModelPropertyData, ValidateWorkspace, @@ -236,8 +237,11 @@ where kinds: HashMap::new(), }, ); - app.add_systems(PreUpdate, update_robot_property_components::) - .add_plugins(RecallPlugin::::default()); + app.add_systems( + PreUpdate, + update_robot_property_components::.after(UpdateRecallSet), + ) + .add_plugins(RecallPlugin::::default()); } }