@@ -17,7 +17,7 @@ use re_viewer_context::{
17
17
ComponentUiRegistry , DisplayMode , Item , PlayState , RecordingConfig , RecordingOrTable ,
18
18
StorageContext , StoreContext , SystemCommand , SystemCommandSender as _, TableStore , ViewClass ,
19
19
ViewClassRegistry , ViewClassRegistryError , command_channel,
20
- open_url:: { ViewerOpenUrl , combine_with_base_url} ,
20
+ open_url:: { OpenUrlOptions , ViewerOpenUrl , combine_with_base_url} ,
21
21
santitize_file_name,
22
22
store_hub:: { BlueprintPersistence , StoreHub , StoreHubStats } ,
23
23
} ;
@@ -431,14 +431,14 @@ impl App {
431
431
432
432
/// Open a content URL in the viewer.
433
433
pub fn open_url_or_file ( & self , url : & str ) {
434
- let follow_if_http = false ;
435
- let select_redap_source_when_loaded = true ;
436
-
437
434
if let Ok ( url) = ViewerOpenUrl :: from_str ( url) {
438
435
url. open (
439
436
& self . egui_ctx ,
440
- follow_if_http,
441
- select_redap_source_when_loaded,
437
+ & OpenUrlOptions {
438
+ follow_if_http : false ,
439
+ select_redap_source_when_loaded : true ,
440
+ show_loader : true ,
441
+ } ,
442
442
& self . command_sender ,
443
443
) ;
444
444
} else {
@@ -734,7 +734,14 @@ impl App {
734
734
return ;
735
735
}
736
736
737
- self . state . navigation . replace ( display_mode) ;
737
+ if matches ! ( display_mode, DisplayMode :: Loading ( _) ) {
738
+ self . state
739
+ . selection_state
740
+ . set_selection ( re_viewer_context:: ItemCollection :: default ( ) ) ;
741
+ self . state . navigation . push ( display_mode) ;
742
+ } else {
743
+ self . state . navigation . replace ( display_mode) ;
744
+ }
738
745
739
746
egui_ctx. request_repaint ( ) ; // Make sure we actually see the new mode.
740
747
}
@@ -1393,7 +1400,7 @@ impl App {
1393
1400
self . state . navigation . pop ( ) ;
1394
1401
}
1395
1402
1396
- DisplayMode :: Settings | DisplayMode :: LocalTable ( _) => {
1403
+ DisplayMode :: Settings | DisplayMode :: Loading ( _ ) | DisplayMode :: LocalTable ( _) => {
1397
1404
re_log:: debug!(
1398
1405
"Cannot toggle chunk store browser from current display mode: {:?}" ,
1399
1406
self . state. navigation. peek( )
@@ -2747,7 +2754,11 @@ impl eframe::App for App {
2747
2754
2748
2755
// Make sure some app is active
2749
2756
// Must be called before `read_context` below.
2750
- if store_hub. active_app ( ) . is_none ( ) {
2757
+ if let DisplayMode :: Loading ( source) = self . state . navigation . peek ( ) {
2758
+ if !self . msg_receive_set ( ) . contains ( source) {
2759
+ self . state . navigation . pop ( ) ;
2760
+ }
2761
+ } else if store_hub. active_app ( ) . is_none ( ) {
2751
2762
let apps: std:: collections:: BTreeSet < & ApplicationId > = store_hub
2752
2763
. store_bundle ( )
2753
2764
. entity_dbs ( )
@@ -2821,15 +2832,15 @@ impl eframe::App for App {
2821
2832
self . command_sender . send_ui ( cmd) ;
2822
2833
}
2823
2834
re_ui:: CommandPaletteAction :: OpenUrl ( url_desc) => {
2824
- let follow_if_http = false ;
2825
- let select_redap_source_when_loaded = true ;
2826
-
2827
2835
match url_desc. url . parse :: < ViewerOpenUrl > ( ) {
2828
2836
Ok ( url) => {
2829
2837
url. open (
2830
2838
egui_ctx,
2831
- follow_if_http,
2832
- select_redap_source_when_loaded,
2839
+ & OpenUrlOptions {
2840
+ follow_if_http : false ,
2841
+ select_redap_source_when_loaded : true ,
2842
+ show_loader : true ,
2843
+ } ,
2833
2844
& self . command_sender ,
2834
2845
) ;
2835
2846
}
0 commit comments