@@ -70,6 +70,7 @@ pub struct MainWindow<'a> {
7070
7171 toasts : egui_notify:: Toasts ,
7272 is_closed : bool ,
73+ is_file_chooser : bool ,
7374 pub is_canceled : bool ,
7475
7576 last_force_load : bool ,
@@ -229,6 +230,7 @@ impl<'a> MainWindow<'a> {
229230 store_options : false ,
230231 sound_thread : Arc :: new ( Mutex :: new ( SoundThread :: new ( ) ) ) ,
231232 last_force_load : false ,
233+ is_file_chooser : false ,
232234 }
233235 }
234236
@@ -254,6 +256,7 @@ impl<'a> MainWindow<'a> {
254256
255257 pub fn show_file_chooser ( & mut self , ctx : & Context , monitor_settins : MonitorSettings ) -> bool {
256258 self . is_closed = false ;
259+ self . is_file_chooser = true ;
257260 unsafe { SETTINGS . monitor_settings = monitor_settins } ;
258261 egui:: SidePanel :: left ( "bottom_panel" ) . exact_width ( 412.0 ) . resizable ( false ) . show ( ctx, |ui| {
259262 let command = self . file_view . show_ui ( ui, true ) ;
@@ -597,7 +600,9 @@ impl<'a> MainWindow<'a> {
597600
598601 fn view_selected ( & mut self , ctx : & Context , file : usize , force_load : bool ) {
599602 if file >= self . file_view . files . len ( ) {
600- ctx. send_viewport_cmd ( egui:: ViewportCommand :: Title ( crate :: DEFAULT_TITLE . clone ( ) ) ) ;
603+ if !self . is_file_chooser {
604+ ctx. send_viewport_cmd ( egui:: ViewportCommand :: Title ( crate :: DEFAULT_TITLE . clone ( ) ) ) ;
605+ }
601606 return ;
602607 }
603608 if let Ok ( thread) = self . sound_thread . lock ( ) {
@@ -618,7 +623,9 @@ impl<'a> MainWindow<'a> {
618623
619624 match self . file_view . files [ file] . item_type ( ) {
620625 ItemType :: Folder => {
621- ctx. send_viewport_cmd ( egui:: ViewportCommand :: Title ( crate :: DEFAULT_TITLE . clone ( ) ) ) ;
626+ if !self . is_file_chooser {
627+ ctx. send_viewport_cmd ( egui:: ViewportCommand :: Title ( crate :: DEFAULT_TITLE . clone ( ) ) ) ;
628+ }
622629 return ;
623630 }
624631 ItemType :: IcyAnimation => self . load_icy_animation ( & path, & data) ,
@@ -636,7 +643,9 @@ impl<'a> MainWindow<'a> {
636643 }
637644 ItemType :: Ansi | ItemType :: AnsiMusic => self . load_ansi ( & path, & data) ,
638645 }
639- ctx. send_viewport_cmd ( egui:: ViewportCommand :: Title ( format ! ( "iCY VIEW {} - {}" , * crate :: VERSION , label) ) ) ;
646+ if !self . is_file_chooser {
647+ ctx. send_viewport_cmd ( egui:: ViewportCommand :: Title ( format ! ( "iCY VIEW {} - {}" , * crate :: VERSION , label) ) ) ;
648+ }
640649 }
641650
642651 fn load_igs ( & mut self , path : & Path , data : & [ u8 ] ) {
0 commit comments