Skip to content

Commit

Permalink
fix-for-ctrl-key-press-miss
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhang95 committed Dec 22, 2023
1 parent e1c2256 commit 30fde95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ui/zenoedit/viewport/viewportwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -409,3 +409,8 @@ void ViewportWidget::keyReleaseEvent(QKeyEvent *event) {
return;
}
}

void ViewportWidget::enterEvent(QEvent *event) {
setFocus();
QWidget::enterEvent(event);
}
1 change: 1 addition & 0 deletions ui/zenoedit/viewport/viewportwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class ViewportWidget : public QGLWidget
void mouseReleaseEvent(QMouseEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mouseDoubleClickEvent(QMouseEvent* event) override;
void enterEvent(QEvent * event) override;
void wheelEvent(QWheelEvent* event) override;
void keyPressEvent(QKeyEvent* event) override;
void keyReleaseEvent(QKeyEvent* event) override;
Expand Down

0 comments on commit 30fde95

Please sign in to comment.