Skip to content

Commit

Permalink
solve open error handling todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Jun 4, 2024
1 parent 384fc6b commit ad33ad6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions crates/re_edit_ui/src/visual_bounds_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ pub fn singleline_edit_visual_bounds_2d(
ui: &mut egui::Ui,
value: &mut VisualBounds2D,
) -> egui::Response {
// Not a lot of space in a single line, so edit width/height instead.
let width = value.x_range.0[1] - value.x_range.0[0];
let height = value.y_range.0[1] - value.y_range.0[0];

Expand Down
4 changes: 3 additions & 1 deletion crates/re_space_view_spatial/src/ui_2d.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use egui::{emath::RectTransform, pos2, vec2, Align2, Color32, Pos2, Rect, Shape,
use macaw::IsoTransform;

use re_entity_db::EntityPath;
use re_log::ResultExt as _;
use re_renderer::view_builder::{TargetConfiguration, ViewBuilder};
use re_space_view::controls::{DRAG_PAN2D_BUTTON, RESET_VIEW_BUTTON_TEXT, ZOOM_SCROLL_MODIFIER};
use re_types::{
Expand Down Expand Up @@ -43,7 +44,8 @@ fn ui_from_scene(
let bounds_property = ViewProperty::from_archetype::<VisualBounds2D>(ctx, view_id);
let bounds: blueprint_components::VisualBounds2D = bounds_property
.component_or_fallback(view_class, view_state)
.unwrap_or_default(); // TODO: error?
.ok_or_log_error()
.unwrap_or_default();
let mut bounds_rect: egui::Rect = bounds.into();

// --------------------------------------------------------------------------
Expand Down

0 comments on commit ad33ad6

Please sign in to comment.