Skip to content

Commit

Permalink
DeskTop: More consistently refresh windows after failed operations
Browse files Browse the repository at this point in the history
If an operation like copy, move, delete, duplicate, etc. fails, the
affected window(s) should only refresh if there was a filesystem change.
This was not done consistently. Make it so!

Some specific fixes:

* When copying/moving/deleting files, the window(s) would always be
  refreshed, even if the operation was canceled during the enumeration
  phase or (for delete) during the confirmation prompt. Now no refresh
  is done in these cases.

* If a shortcut is "Copy to RAMCard: on first use", the RAMCard's
  window was visible, and the copy fails, the window was never
  refreshed. Now it is, conditionally.

Some deduping was done to keep the delta here down to +22 bytes.
  • Loading branch information
inexorabletash committed Oct 17, 2024
1 parent 7a62f74 commit 25aaf9e
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 58 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Project Page: https://github.com/a2stuff/a2d
* Allow keyboard selection of icons in all windows.
* Show tip about copying PRODOS during Format/Erase process.
* Arrow keys now move icon selection in appropriate direction. ([#300](https://github.com/a2stuff/a2d/issues/300))
* More consistently refresh (or don't refresh) window contents after canceled or failed operations.

### Selector

Expand Down
4 changes: 2 additions & 2 deletions desktop/internal.inc
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ kListViewScrollTickV = kListViewRowHeight
;;; Operations
kOperationSucceeded = 0
kOperationCanceled = 1
kOperationFailed = $FF
kOperationCanceled = 1 ; no filesystem changes occurred
kOperationFailed = $FF ; filesystem changes possibly occurred
;;; ============================================================
;;; Memory Areas
Expand Down
Loading

0 comments on commit 25aaf9e

Please sign in to comment.