Keep the Select Lines dialog open when no lines match - #680
Open
MawCeron wants to merge 1 commit into
Open
Conversation
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
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DialogSelection::Processclosed 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.(Reopens #679, closed only because the branch's commit needed its authorship fixed — same change, no functional difference.)
Fixes #349
Test plan
src/dialog_selection.cppto confirmcountis 0 exactly when the message box reports no lines were set/added/removed, for everyActionbranch (SET/ADD/SUB/INTERSECT).