Skip to content

Commit 212ec06

Browse files
committed
MapWidget: Pass Tab key press to tools first
1 parent 7e0bf02 commit 212ec06

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/gui/map/map_widget.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -724,6 +724,14 @@ bool MapWidget::event(QEvent* event)
724724
if (static_cast<QTouchEvent*>(event)->touchPoints().count() >= 2)
725725
return true;
726726
break;
727+
728+
case QEvent::KeyPress:
729+
// No focus changing in QWidget::event if Tab is handled by tool.
730+
if (static_cast<QKeyEvent*>(event)->key() == Qt::Key_Tab
731+
&& keyPressEventFilter(static_cast<QKeyEvent*>(event)))
732+
return true;
733+
break;
734+
727735
default:
728736
; // nothing
729737
}

0 commit comments

Comments
 (0)