Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't persist blueprints for unknown apps #2165

Merged
merged 2 commits into from
May 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,20 @@ impl App {
);
}

let state: AppState = if startup_options.persist_state {
let mut state: AppState = if startup_options.persist_state {
storage
.and_then(|storage| eframe::get_value(storage, eframe::APP_KEY))
.unwrap_or_default()
} else {
AppState::default()
};

// Forget the blueprint we used for some unknown app,
// so we don't reuse it for some unrelated unknown app.
// This is in particularly important for `rerun foo.png`
// followed by `rerun bar.png`, which both uses the unknow App ID.
state.blueprints.remove(&ApplicationId::unknown());

let mut analytics = ViewerAnalytics::new();
analytics.on_viewer_started(&build_info, app_env);

Expand Down
2 changes: 1 addition & 1 deletion crates/re_viewer/src/ui/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ fn space_view_ui(
) {
let Some(latest_at) = ctx.rec_cfg.time_ctrl.time_int() else {
ui.centered_and_justified(|ui| {
ui.label(ctx.re_ui.warning_text("No time selected"));
ui.weak("No time selected");
});
return
};
Expand Down