Skip to content

Fix inconsistent Operations buttons and check actions that affect drivers hidden by search - #494

Merged
lostindark merged 3 commits into
lostindark:masterfrom
indep-arg:fix/checkbox-search-scope
Nov 1, 2026
Merged

lostindark merged 3 commits into
lostindark:masterfrom
indep-arg:fix/checkbox-search-scope

Conversation

@indep-arg

@indep-arg indep-arg commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Two fixes, one commit each.

1. Consistent hover effect in the Operations panel

Refresh, Add and Delete have used FlatStyle.System since v0.5, but the buttons added
later (Select Old, Select Unused, Export, Export All) kept the default WinForms style.
The two styles react differently when the mouse is over them, so the panel looked
inconsistent. All Operations buttons now use FlatStyle.System, the native Windows
button. This is a one-line property change per button, in the same form the designer
generates.

Before:

2026-11-01.12-52-31.mp4

After:

2026-11-01.12-53-11.mp4

2. Check actions no longer change drivers hidden by the search

While a search is active, ObjectListView's CheckedObjects returns only the rows that
are shown, but CheckAll() and the CheckedObjects setter change every driver. As a
result:

Action (search active) Before
Select All Also checked hidden drivers. Delete and the status bar counted only the shown ones; the hidden ones reappeared checked once the search was cleared.
Invert Selection Checked every hidden driver instead of inverting it.
Select (context menu) Silently unchecked hidden drivers.
Select Old / Select Unused Checked matches hidden by the search.

Now:

  • Select All, Invert Selection and Select change only the shown rows; hidden drivers
    keep their check state.
  • Select Old and Select Unused look at the whole driver store, so they clear the search
    first and everything they check is visible. Cancelling the unused-driver warning keeps
    the search.

Before:

2026-11-01.12-57-23.mp4

After:

2026-11-01.12-57-54.mp4

Tests

5 new tests in DSEFormTests:

  • OperationButtonsShareTheNativeButtonStyle builds the designer controls and checks
    every Operations button.
  • CheckActionsLeaveDriversHiddenBySearchUnchanged covers Select All, Invert and Select
    with a search active.
  • StoreWideSelectionClearsTheSearchFirst covers Select Old and Select Unused.
  • CancelledUnusedDriverSelectionKeepsTheSearch.

Refresh, Add and Delete have used FlatStyle.System since v0.5, but buttons
added later (Select Old, Select Unused, Export and Export All) kept the
default WinForms style. The two styles react differently when the mouse
hovers over them, so the panel looked inconsistent. Give the newer buttons
FlatStyle.System too, and add a test that checks every Operations button.
With a search active, ObjectListView's CheckedObjects only returns the rows
that are shown, while CheckAll and the CheckedObjects setter change every
driver. That made several actions affect drivers the user could not see:

- Select All checked drivers hidden by the search. Delete and the status
  bar only counted the shown ones, and the hidden drivers reappeared
  checked once the search was cleared.
- Invert Selection checked every hidden driver instead of inverting it.
- Select from the context menu silently unchecked hidden drivers.
- Select Old and Select Unused checked matches hidden by the search.

Select All, Invert Selection and Select now only change the shown rows, so
hidden drivers keep their check state. Select Old and Select Unused look at
the whole store, so they clear the search first and everything they check
is visible. Cancelling the unused-driver warning keeps the search.
@indep-arg
indep-arg marked this pull request as ready for review November 1, 2026 16:00
@lostindark
lostindark requested a balanced review from Copilot November 1, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A pending search query is not cleared when a store-wide selection action runs before the debounce completes, allowing the timer to hide newly checked drivers; the guard needs correction and a regression test.

1 open issue
1 file not reviewed
  • Rapr/DSEForm.Designer.cs: Generated file
What changed in this PR

This PR makes the Operations buttons visually consistent and updates driver check actions to respect search visibility.

Changes:

  • Applies the native Windows button style to all Operations buttons.
  • Limits ordinary check actions to visible drivers and clears applied searches before store-wide selection.
  • Adds regression tests for button styling, filtered selection, and warning cancellation.
File Description
RaprTests/​DSEFormTests.cs Adds tests for button styles and search-aware selection behavior.
Rapr/​DSEForm.Designer.cs Sets four Operations buttons to FlatStyle.System.
Rapr/​DSEForm.cs Updates check actions and adds search clearing for store-wide selection.

Review effort: Balanced

Comment thread Rapr/DSEForm.cs Resolved
The search box applies its filter through a 300 ms debounce timer. If
Select Old ran, or Select Unused ran with its warning turned off, right
after typing, the filter was still null, so the search was not cleared
and the timer stayed running. Its tick then applied the search and hid
drivers that the selection had just checked.

Check the search text as well as the filter, and stop the timer in both
cases. Add a regression test that runs both actions before the filter
is applied.
@indep-arg

Copy link
Copy Markdown
Contributor Author

Good catch, confirmed. With text typed less than 300 ms earlier, ModelFilter was still null, so the search wasn't cleared and the debounce tick hid the newly checked drivers. Fixed in 4a83851: the helper now checks the search text as well as the filter, clears it and stops the timer. StoreWideSelectionClearsASearchThatIsNotAppliedYet runs both Select Old and Select Unused before the filter is applied; it failed before the fix.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the Operations button styling and search-aware selection changes.

No open issues 🎉

1 resolved since last review
1 file not reviewed
  • Rapr/DSEForm.Designer.cs: Generated file

Review effort: Balanced

@lostindark
lostindark merged commit 292d335 into lostindark:master Nov 1, 2026
2 checks passed
@indep-arg
indep-arg deleted the fix/checkbox-search-scope branch November 1, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants