aboutsummaryrefslogtreecommitdiffstats
path: root/src/tagstrip.cpp
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-07 18:22:45 +0200
committerDanilo M. <danix@danix.xyz>2026-08-07 18:22:45 +0200
commit48c243d7aee3382713f7a4653be2179d313b432c (patch)
treeb5eb63907e3f7cff18815844baccce71f4492dc1 /src/tagstrip.cpp
parentd62a9eb9694beee1674f9c63f9a77029a81627ee (diff)
downloadqtmaildir-48c243d7aee3382713f7a4653be2179d313b432c.tar.gz
qtmaildir-48c243d7aee3382713f7a4653be2179d313b432c.zip
feat(ui): make Escape deselect the row as well as blank the pane
Blanking the pane while leaving the row highlighted reads as half an action, and deselecting is what Escape means nearly everywhere else. The user asked for two actions rather than a changed one, so clear_pane keeps its behaviour and moves to Shift+Esc; clear_selection takes Escape and does both. Shift+Esc rather than unbound because every action carries a default and a test enforces it. Clearing the selection re-adopts the thread it just cleared, unless done in exactly the right way. clearSelection() leaves currentIndex() valid, so onSelectionChanged takes its "one or fewer rows" branch, sees a current row whose id differs from m_currentThreadId, and calls onThreadSelected for it. Clearing the selection before blanking lets that run while the id still matches, so nothing reloads, and clearing current stops a later collapse-to-one-row reaching the same row. All four arrangements were tried; only this one passes. The first version of the test could not distinguish any of them. It asserted showingPlaceholder(), which passes regardless because this fixture has no worker, so loadThread never replies and the pane is never repainted. currentThreadId() and currentIndex() are observable without one, and asserting those is what made the test discriminate.
Diffstat (limited to 'src/tagstrip.cpp')
0 files changed, 0 insertions, 0 deletions