Skip to content

Commit

Permalink
Fix broken instance picking in presence of images (#1876)
Browse files Browse the repository at this point in the history
Recently broke by accident all instance picking for any scene that also has an image.
  • Loading branch information
Wumpf authored Apr 18, 2023
1 parent 1ddb2d3 commit 36e21d6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/re_viewer/src/ui/view_spatial/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -754,8 +754,6 @@ pub fn picking(
let picked_image_with_coords = if hit.hit_type == PickingHitType::TexturedRect
|| *ent_properties.backproject_depth.get()
{
// We don't support selecting pixels yet.
instance_path.instance_key = re_log_types::component_types::InstanceKey::SPLAT;
scene
.ui
.images
Expand All @@ -774,6 +772,10 @@ pub fn picking(
} else {
None
};
if picked_image_with_coords.is_some() {
// We don't support selecting pixels yet.
instance_path.instance_key = re_log_types::component_types::InstanceKey::SPLAT;
}

hovered_items.push(crate::misc::Item::InstancePath(
Some(space_view_id),
Expand Down

0 comments on commit 36e21d6

Please sign in to comment.