Skip to content

Commit

Permalink
Order the property update after the recall update
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <[email protected]>
  • Loading branch information
mxgrey committed Feb 14, 2025
1 parent 0e1a5c3 commit 2bcdfa3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
7 changes: 6 additions & 1 deletion rmf_site_editor/src/site/recall_plugin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T: Recall + Component + Default>
where
Expand All @@ -37,7 +41,8 @@ where
(
add_recaller::<T>.after(SiteUpdateSet::ProcessChanges),
update_recaller::<T>.after(SiteUpdateSet::ProcessChanges),
),
)
.in_set(UpdateRecallSet),
);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -236,8 +237,11 @@ where
kinds: HashMap::new(),
},
);
app.add_systems(PreUpdate, update_robot_property_components::<Property>)
.add_plugins(RecallPlugin::<RecallProperty>::default());
app.add_systems(
PreUpdate,
update_robot_property_components::<Property>.after(UpdateRecallSet),
)
.add_plugins(RecallPlugin::<RecallProperty>::default());
}
}

Expand Down

0 comments on commit 2bcdfa3

Please sign in to comment.