File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
utils/re_smart_channel/src
viewer/re_component_ui/src/variant_uis Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,14 @@ impl SmartChannelSource {
130
130
}
131
131
}
132
132
133
+ /// Same as [`Self::redap_uri`], but strips any extra query or fragment from the uri.
134
+ pub fn stripped_redap_uri ( & self ) -> Option < RedapUri > {
135
+ self . redap_uri ( ) . map ( |uri| match uri {
136
+ RedapUri :: Catalog ( _) | RedapUri :: Entry ( _) | RedapUri :: Proxy ( _) => uri,
137
+ RedapUri :: DatasetData ( uri) => RedapUri :: DatasetData ( uri. without_query_and_fragment ( ) ) ,
138
+ } )
139
+ }
140
+
133
141
/// Loading text for sources that load data from a specific source (e.g. a file or a URL).
134
142
///
135
143
/// Returns `None` for any source that receives data dynamically through SDK calls or similar.
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ pub fn redap_uri_button(
38
38
if db
39
39
. data_source
40
40
. as_ref ( )
41
- . is_some_and ( |source| source. redap_uri ( ) . as_ref ( ) == Some ( & uri) )
41
+ . is_some_and ( |source| source. stripped_redap_uri ( ) . as_ref ( ) == Some ( & uri) )
42
42
{
43
43
Some ( db. store_id ( ) . clone ( ) )
44
44
} else {
@@ -50,7 +50,7 @@ pub fn redap_uri_button(
50
50
. connected_receivers
51
51
. sources ( )
52
52
. iter ( )
53
- . any ( |source| source. redap_uri ( ) . as_ref ( ) == Some ( & uri) ) ;
53
+ . any ( |source| source. stripped_redap_uri ( ) . as_ref ( ) == Some ( & uri) ) ;
54
54
55
55
// Show the link left aligned and justified, so the whole cell is clickable.
56
56
let put_justified_left_aligned = |ui : & mut Ui , link| {
You can’t perform that action at this time.
0 commit comments