@@ -1974,12 +1974,29 @@ contains |
| 1974 | 1974 | ! Callback wrapper for scan completion |
| 1975 | 1975 | subroutine scan_complete_callback_wrapper() |
| 1976 | 1976 | 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 |
| 1977 | 1981 | |
| 1978 | 1982 | print *, "=== SCAN COMPLETE CALLBACK FIRED ===" |
| 1979 | 1983 | |
| 1980 | 1984 | ! Call the original completion callback |
| 1981 | 1985 | call mark_initial_scan_complete() |
| 1982 | 1986 | |
| 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 | + |
| 1983 | 2000 | ! Update cancel button (scan is done, should be disabled and grey) |
| 1984 | 2001 | print *, "=== UPDATING CANCEL BUTTON FROM COMPLETION CALLBACK ===" |
| 1985 | 2002 | call update_cancel_scan_button_state() |
@@ -1988,6 +2005,10 @@ contains |
| 1988 | 2005 | print *, "=== RE-ENABLING NAVIGATION BUTTONS ===" |
| 1989 | 2006 | call update_history_buttons() |
| 1990 | 2007 | |
| 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 | + |
| 1991 | 2012 | ! Complete any pending synthetic navigation |
| 1992 | 2013 | if (pending_synthetic_nav) then |
| 1993 | 2014 | print *, "=== PENDING SYNTHETIC NAV - COMPLETING ===" |