Skip to content

Commit

Permalink
Fix objects with transform only missing in arrow and selection histor…
Browse files Browse the repository at this point in the history
…y prune crash (#844)

* Fix objects with transform only not being added to scenes in arrow
* Fix selection history prune causing crashes
  • Loading branch information
Wumpf authored Jan 20, 2023
1 parent 2ad4848 commit aa09fe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/re_viewer/src/ui/selection_history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl SelectionHistory {
.collect::<Vec<_>>();

if valid_elements.is_empty() {
if i < self.current {
if i <= self.current {
self.current -= 1; // Ensure the current counter stays valid!
}
None
Expand Down
3 changes: 2 additions & 1 deletion crates/re_viewer/src/ui/view_category.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use re_log_types::{
Box3D, LineStrip2D, LineStrip3D, Point2D, Point3D, Rect2D, Tensor, TensorTrait, TextEntry,
},
msg_bundle::Component,
Arrow3D, DataPath, Mesh3D,
Arrow3D, DataPath, Mesh3D, Transform,
};
use re_query::query_entity_with_primary;

Expand Down Expand Up @@ -131,6 +131,7 @@ pub fn categorize_arrow_obj_path(
|| component == LineStrip3D::name()
|| component == Mesh3D::name()
|| component == Arrow3D::name()
|| component == Transform::name()
{
set.insert(ViewCategory::Spatial);
} else if component == Tensor::name() {
Expand Down

1 comment on commit aa09fe4

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: aa09fe4 Previous: 2ad4848 Ratio
datastore/insert/batch/rects/insert 563321 ns/iter (± 4496) 566078 ns/iter (± 2155) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.