Skip to content

Keep the Select Lines dialog open when no lines match - #680

Open
MawCeron wants to merge 1 commit into
TypesettingTools:masterfrom
MawCeron:fix/dialog-selection-no-results
Open

Keep the Select Lines dialog open when no lines match#680
MawCeron wants to merge 1 commit into
TypesettingTools:masterfrom
MawCeron:fix/dialog-selection-no-results

Conversation

@MawCeron

@MawCeron MawCeron commented Aug 19, 2026

Copy link
Copy Markdown

Summary

  • DialogSelection::Process closed the dialog unconditionally on OK, even when the search/action changed nothing (count == 0) — right after showing a message box saying so. That forced the user to reopen the dialog and redo the search from scratch after any typo or unchecked option.
  • Only close the dialog when the selection actually changed; otherwise leave it open so the user can adjust the criteria in place.

(Reopens #679, closed only because the branch's commit needed its authorship fixed — same change, no functional difference.)

Fixes #349

Test plan

  • Read the code path in src/dialog_selection.cpp to confirm count is 0 exactly when the message box reports no lines were set/added/removed, for every Action branch (SET/ADD/SUB/INTERSECT).
  • Manual: built locally (meson/ninja, Linux/GTK3), opened Subtitle > Select Lines..., searched for text that matches nothing, pressed OK — the "Selection was set to no lines" message appears and the dialog now stays open instead of closing.

Pressing OK closed the dialog unconditionally, even when the search
matched nothing (or an add/subtract/intersect changed no lines), right
after a message box told the user so. Only close it when the action
actually changed the selection, so the user can adjust the criteria
without reopening the dialog.

Fixes TypesettingTools#349
@CoffeeFlux

Copy link
Copy Markdown
Member

If you could say more about your workflow on the issue itself that motivated this, that'd be much appreciated. I'm not clear whether this is a change worth making or something else related to this flow needs to be thought through, so more information would be helpful.

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.

Enhancement: Keep the Line Selection Window Open When No Results Are Found

2 participants