diff --git a/docs/PLAN.md b/docs/PLAN.md index 98b986b..903414b 100644 --- a/docs/PLAN.md +++ b/docs/PLAN.md @@ -137,6 +137,8 @@ Therefore the palette is replaced, not extended, and the replacement is built on does the usual primary-selection paste. - Right-button chords are intentionally **not** ported — the right button is the 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 - `:`-verb pack via `KTextEditor::Command`: `sort`, `align`, `json`, `b64`, diff --git a/src/plugin/ollieplugin.cpp b/src/plugin/ollieplugin.cpp index b2493d8..c39b2ba 100644 --- a/src/plugin/ollieplugin.cpp +++ b/src/plugin/ollieplugin.cpp @@ -399,6 +399,13 @@ bool OllieView::eventFilter(QObject *obj, QEvent *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 // press is consumed so the context menu does not appear and the caret is // not moved (an intentional, configured trade-off).