Radial: suppress gesture while left button is held

An RMB press during a left-drag (mid-selection, or while setting up a
left+middle chord) must not pop the radial. Guard the gesture start on both
the tracked left-held-in-view flag and the live QMouseEvent::buttons() state
so a right press with left already down falls through instead of opening the
radial. All 5 ctest suites green.
This commit is contained in:
Levi Neely 2026-10-07 17:14:26 +02:00
parent d117aebb7f
commit 75367f85ef
2 changed files with 9 additions and 0 deletions

View File

@ -137,6 +137,8 @@ Therefore the palette is replaced, not extended, and the replacement is built on
does the usual primary-selection paste. does the usual primary-selection paste.
- Right-button chords are intentionally **not** ported — the right button is the - Right-button chords are intentionally **not** ported — the right button is the
radial gesture. (Revisit later.) radial gesture. (Revisit later.)
- The radial gesture is suppressed while the left button is held, so an RMB tap
mid-selection (or during a left+middle chord) does not pop the radial.
### M5 — Command vocabulary + project model + switchers — NEXT ### M5 — Command vocabulary + project model + switchers — NEXT
- `:`-verb pack via `KTextEditor::Command`: `sort`, `align`, `json`, `b64`, - `:`-verb pack via `KTextEditor::Command`: `sort`, `align`, `json`, `b64`,

View File

@ -399,6 +399,13 @@ bool OllieView::eventFilter(QObject *obj, QEvent *event)
return QObject::eventFilter(obj, event); return QObject::eventFilter(obj, event);
} }
// Suppress the radial when the left button is already held: the user is
// mid-selection (or setting up a left+middle chord), not starting a clean
// radial gesture. buttons() reports the other buttons down at press time.
if (m_leftDownInView || (me->buttons() & Qt::LeftButton)) {
return QObject::eventFilter(obj, event);
}
// Pop the radial at the press position and begin the drag gesture. The // Pop the radial at the press position and begin the drag gesture. The
// press is consumed so the context menu does not appear and the caret is // press is consumed so the context menu does not appear and the caret is
// not moved (an intentional, configured trade-off). // not moved (an intentional, configured trade-off).