fortrangoingonforty/sniffly / 6528e81

Browse files

sync tab state on scan complete, remove blue pulsing dynamically

Authored by espadonne
SHA
6528e81992b507e47f84e9067c06211709724e53
Parents
2931df0
Tree
fe62cac

1 changed file

StatusFile+-
M src/gui/gtk_app.f90 21 0
src/gui/gtk_app.f90modified
@@ -1974,12 +1974,29 @@ contains
19741974
   ! Callback wrapper for scan completion
19751975
   subroutine scan_complete_callback_wrapper()
19761976
     use treemap_widget, only: mark_initial_scan_complete
1977
+    use treemap_renderer, only: get_root_node, get_current_view_node
1978
+    use types, only: file_node
1979
+    type(tab_state), pointer :: tab
1980
+    type(file_node), pointer :: root, current_view
19771981
 
19781982
     print *, "=== SCAN COMPLETE CALLBACK FIRED ==="
19791983
 
19801984
     ! Call the original completion callback
19811985
     call mark_initial_scan_complete()
19821986
 
1987
+    ! Sync active tab's state with renderer (tab now has data)
1988
+    tab => get_active_tab()
1989
+    if (associated(tab)) then
1990
+      root => get_root_node()
1991
+      current_view => get_current_view_node()
1992
+      if (associated(root)) then
1993
+        tab%has_data = .true.
1994
+        tab%root_node => root
1995
+        tab%current_view_node => current_view
1996
+        print *, "=== SYNCED TAB STATE AFTER SCAN COMPLETE ==="
1997
+      end if
1998
+    end if
1999
+
19832000
     ! Update cancel button (scan is done, should be disabled and grey)
19842001
     print *, "=== UPDATING CANCEL BUTTON FROM COMPLETION CALLBACK ==="
19852002
     call update_cancel_scan_button_state()
@@ -1988,6 +2005,10 @@ contains
19882005
     print *, "=== RE-ENABLING NAVIGATION BUTTONS ==="
19892006
     call update_history_buttons()
19902007
 
2008
+    ! Update UI for active tab (removes blue pulsing if tab now has data)
2009
+    print *, "=== UPDATING UI FOR ACTIVE TAB (SCAN COMPLETE) ==="
2010
+    call update_ui_for_active_tab()
2011
+
19912012
     ! Complete any pending synthetic navigation
19922013
     if (pending_synthetic_nav) then
19932014
       print *, "=== PENDING SYNTHETIC NAV - COMPLETING ==="