diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index 4d7ed1e1..f15e1392 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -34,6 +34,7 @@ Project Page: https://github.com/a2stuff/a2d * Remove Special > Lock and Special > Unlock commands. * Allow selection to remain in inactive windows. * Fix off-by-one in used/free values in window headers. +* Fix updating of window headers following File > New Folder. ### Selector diff --git a/desktop/main.s b/desktop/main.s index b32ec7e5..d8a806b1 100644 --- a/desktop/main.s +++ b/desktop/main.s @@ -2395,6 +2395,7 @@ phase: .byte 0 a_path: .addr 0 .endparams +;;; Assert: There is an active window .proc CmdNewFolderImpl ;; access = destroy/rename/write/read @@ -2403,8 +2404,7 @@ a_path: .addr 0 start: copy #NewFolderDialogState::open, new_folder_dialog_params::phase jsr NewFolderDialogProc -L4FC6: lda active_window_id - beq done ; command should not be active without a window +retry: lda active_window_id jsr GetWindowPath stax new_folder_dialog_params::a_path @@ -2425,16 +2425,18 @@ L4FC6: lda active_window_id ;; Failure jsr ShowAlert - jmp L4FC6 + jmp retry success: copy #NewFolderDialogState::close, new_folder_dialog_params::phase jsr NewFolderDialogProc - param_call FindLastPathSegment, src_path_buf - sty src_path_buf - jsr FindWindowForSrcPath - beq done + ;; Update cached used/free for all same-volume windows + lda active_window_id + jsr GetWindowPath + jsr UpdateUsedFreeViaPath + + lda active_window_id jsr SelectAndRefreshWindowOrClose bne done diff --git a/res/notes/testplan.md b/res/notes/testplan.md index a5a75b24..8f5fa8f0 100644 --- a/res/notes/testplan.md +++ b/res/notes/testplan.md @@ -92,6 +92,7 @@ * Open a folder with only one item. File > New Folder. Enter a name and click OK. Verify that the window header says "2 Items" * Open window for an otherwise empty RAMDisk volume. Note the "K in disk" and "K free" values in the header. File > New Folder. Enter a name and click OK. Verify that the "K in disk" increases by 0 or 1, and that the "K free" decreases by 0 or 1. File > New Folder. Enter another name and click OK. Verify that the "K in disk" increases by 0 or 1, and that the "K free" decreases by 0 or 1. +* Open two windows for different volumes. Note the "items", "K in disk" and "K free" values in the header of the second window. File > New Folder. Enter a name and click OK. Verify that the "items" value increases by one, and "K in disk" increases by 0 or 1, and that the "K free" decreases by 0 or 1. * Launch DeskTop. Open a window for a removable disk. Quit DeskTop. Remove the disk. Restart DeskTop. Open a different volume's window. Close it. Open it again. Verify that items in the File menu needing a window (New Folder, Close, etc) are correctly enabled.