benini / scid

Other
43 stars 12 forks source link

Twin game checker prevents undelete #106

Closed nicktmro closed 1 year ago

nicktmro commented 1 year ago

Summary: When working on removing duplicates from a database, the Twin Checker Window prevents the user form unselecting a game for deletion and completely breaks the flow.

Environment SCID Version 5.0.0, Jan 27 2023 running on macOS Ventura, Using Tcl/Tk version: 8.6.13 Tcl(8.6.13), TclOO(1.1.0), Tk(8.6.13), Ttk(8.6.13), ezsmtp(1.0.0), msgcat(1.6.1), opt(0.4.8), tcl::tommath(8.6.13), tooltip(1.4.6), ttk::theme::alt(8.6), ttk::theme::aqua(8.6), ttk::theme::clam(8.6), ttk::theme::classic(8.6), ttk::theme::default(8.6), zlib(2.0.1).

Steps to reproduce:

  1. Load a (large) database that contains duplicate games
  2. From the Database Menu, select Maintenance > Delete Games
  3. Set the filters and Click Delete Games Delete Twin Games filters
  4. Click OK on the Popup Window the show the number of twin games that were found
  5. SCID has now loaded the Twin Game Checker Twin game checker is ready
  6. The game on the right hand side is not selected for deletion (and this can also be verified in the Game List: only the game on the left hand side is flagged for deletion and appears greyed out)
  7. Click the Deleted checkbox on the right hand side of the Twin Game Checker

Expected results:

Actual results:

Notes:

Note: after Step 4, I also expected the Game List to be updated to only show the filtered games, but that did not happen. Will be the subject of another Issue, unless addressed first.

nicktmro commented 1 year ago

Note that unselecting the Deleted checkbox on the left hand side also leads to the right hand side "twin" game disappearing from the Twin game checker dialog.

benini commented 1 year ago

Many thanks. Fixed with: https://github.com/benini/scid/commit/5aade37aabff6966fc7f1508f82fe8f5fb3fbd64

nicktmro commented 1 year ago

Thank you for fixing this so quickly. I just compiled and tested the commit, and the reported issue is gone. Using the mouse to toggle the checkbox works as expected. Unfortunately, upon further testing, I found that using the 2 keyboard shortcut to flip the selection does not work..

Note: it is surprising because using 1 to select and unselect the left hand side game works as expected.