Skip to content

Commit

Permalink
Swap overlay order of selection & hover outlines (#1705)
Browse files Browse the repository at this point in the history
This causes selected things to no longer to be overwritten by hover outlines - Fixes #1597.
  • Loading branch information
Wumpf authored Mar 25, 2023
1 parent 6ebe58b commit 0749d34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/re_viewer/src/misc/selection_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,12 @@ impl SelectionState {
let mut next_selection_mask = || {
// We don't expect to overflow u8, but if we do, don't use the "background mask".
selection_mask_index = selection_mask_index.wrapping_add(1).at_least(1);
OutlineMaskPreference::some(selection_mask_index, 0)
OutlineMaskPreference::some(0, selection_mask_index)
};
let mut next_hover_mask = || {
// We don't expect to overflow u8, but if we do, don't use the "background mask".
hover_mask_index = hover_mask_index.wrapping_add(1).at_least(1);
OutlineMaskPreference::some(0, hover_mask_index)
OutlineMaskPreference::some(hover_mask_index, 0)
};

for current_selection in self.selection.iter() {
Expand Down
4 changes: 2 additions & 2 deletions crates/re_viewer/src/ui/view_spatial/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -605,7 +605,7 @@ pub fn outline_config(gui_ctx: &egui::Context) -> OutlineConfig {

OutlineConfig {
outline_radius_pixel: (gui_ctx.pixels_per_point() * 1.5).at_least(0.5),
color_layer_a: selection_outline_color,
color_layer_b: hover_outline_color,
color_layer_a: hover_outline_color,
color_layer_b: selection_outline_color,
}
}

1 comment on commit 0749d34

@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: 0749d34 Previous: 9f08910 Ratio
datastore/insert/batch/rects/insert 564652 ns/iter (± 2634) 535786 ns/iter (± 7633) 1.05
datastore/latest_at/batch/rects/query 1894 ns/iter (± 15) 1889 ns/iter (± 21) 1.00
datastore/latest_at/missing_components/primary 286 ns/iter (± 0) 286 ns/iter (± 2) 1
datastore/latest_at/missing_components/secondaries 438 ns/iter (± 0) 426 ns/iter (± 5) 1.03
datastore/range/batch/rects/query 150500 ns/iter (± 755) 144856 ns/iter (± 2172) 1.04
mono_points_arrow/generate_message_bundles 47989612 ns/iter (± 442261) 45850980 ns/iter (± 1850685) 1.05
mono_points_arrow/generate_messages 124779648 ns/iter (± 958301) 134893342 ns/iter (± 1598268) 0.93
mono_points_arrow/encode_log_msg 159188318 ns/iter (± 1170373) 162120553 ns/iter (± 1786434) 0.98
mono_points_arrow/encode_total 331212498 ns/iter (± 2380425) 346154791 ns/iter (± 3020593) 0.96
mono_points_arrow/decode_log_msg 176499247 ns/iter (± 841555) 179423833 ns/iter (± 2267808) 0.98
mono_points_arrow/decode_message_bundles 64400766 ns/iter (± 804128) 70610602 ns/iter (± 1360115) 0.91
mono_points_arrow/decode_total 237855916 ns/iter (± 1433300) 246521038 ns/iter (± 2980571) 0.96
batch_points_arrow/generate_message_bundles 340964 ns/iter (± 517) 341039 ns/iter (± 1517) 1.00
batch_points_arrow/generate_messages 6313 ns/iter (± 18) 6231 ns/iter (± 71) 1.01
batch_points_arrow/encode_log_msg 370683 ns/iter (± 6491) 359122 ns/iter (± 2864) 1.03
batch_points_arrow/encode_total 735922 ns/iter (± 3175) 711662 ns/iter (± 9472) 1.03
batch_points_arrow/decode_log_msg 349813 ns/iter (± 1470) 340495 ns/iter (± 3541) 1.03
batch_points_arrow/decode_message_bundles 2043 ns/iter (± 7) 1941 ns/iter (± 21) 1.05
batch_points_arrow/decode_total 355036 ns/iter (± 1890) 349205 ns/iter (± 3286) 1.02
arrow_mono_points/insert 6178026404 ns/iter (± 19143005) 6929735477 ns/iter (± 28837413) 0.89
arrow_mono_points/query 1813840 ns/iter (± 28780) 1780043 ns/iter (± 27911) 1.02
arrow_batch_points/insert 2708501 ns/iter (± 20812) 2632132 ns/iter (± 24682) 1.03
arrow_batch_points/query 16170 ns/iter (± 652) 16196 ns/iter (± 91) 1.00
arrow_batch_vecs/insert 42638 ns/iter (± 261) 41452 ns/iter (± 406) 1.03
arrow_batch_vecs/query 389167 ns/iter (± 1142) 386691 ns/iter (± 4645) 1.01
tuid/Tuid::random 34 ns/iter (± 0) 34 ns/iter (± 0) 1

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

Please sign in to comment.