Skip to content

Commit 3e7ea89

Browse files
committed
make logging static components not clear redo buffer
1 parent 1b10e83 commit 3e7ea89

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

crates/viewer/re_viewer/src/app.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,8 @@ impl App {
821821

822822
let db = store_hub.entity_db_mut(&store_id);
823823

824-
if store_id.is_blueprint() {
824+
// No need to clear undo buffer if we're just appending static data.
825+
if store_id.is_blueprint() && chunks.iter().any(|c| !c.is_static()) {
825826
self.state
826827
.blueprint_undo_state
827828
.entry(store_id)

crates/viewer/re_viewer_context/src/blueprint_helpers.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub trait BlueprintContext {
8080
self.save_serialized_blueprint_component(entity_path, serialized);
8181
}
8282

83-
fn save_blueprint_component_static(
83+
fn save_static_blueprint_component(
8484
&self,
8585
entity_path: EntityPath,
8686
component_descr: &ComponentDescriptor,
@@ -91,10 +91,10 @@ pub trait BlueprintContext {
9191
return;
9292
};
9393

94-
self.save_serialized_blueprint_component_static(entity_path, serialized);
94+
self.save_serialized_static_blueprint_component(entity_path, serialized);
9595
}
9696

97-
fn save_serialized_blueprint_component_static(
97+
fn save_serialized_static_blueprint_component(
9898
&self,
9999
entity_path: EntityPath,
100100
component_batch: SerializedComponentBatch,

crates/viewer/re_viewer_context/src/time_control.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ impl<T: BlueprintContext> TimeBlueprintExt for T {
5252

5353
fn set_time(&self, time: impl Into<TimeInt>) {
5454
let time: TimeInt = time.into();
55-
self.save_blueprint_component_static(
55+
self.save_static_blueprint_component(
5656
time_panel_blueprint_entity_path(),
5757
&TimePanelBlueprint::descriptor_time(),
5858
&re_types::blueprint::components::TimeCell(time.as_i64().into()),

0 commit comments

Comments
 (0)