Skip to content

Commit

Permalink
[BUGFIX] fix hover cursor not always resetting
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaseberle committed Jun 17, 2023
1 parent 59074e1 commit d8e314f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/GLWidget.cpp
Expand Up @@ -1569,6 +1569,11 @@ void GLWidget::wheelEvent(QWheelEvent* event) {
zoomIn((double) event->angleDelta().y() / Settings::wheelMax());
}

void GLWidget::leaveEvent(QEvent* event) {
QWidget::leaveEvent(event);
setCursor(Qt::ArrowCursor);
}

bool GLWidget::event(QEvent* event) {
// we are experimenting to not use tooltips by default currently
if (Settings::showToolTips() && event->type() == QEvent::ToolTip) {
Expand Down
1 change: 1 addition & 0 deletions src/GLWidget.h
Expand Up @@ -63,6 +63,7 @@ class GLWidget
void mouseReleaseEvent(QMouseEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void wheelEvent(QWheelEvent* event) override;
void leaveEvent(QEvent* event) override;
bool event(QEvent* event) override;
private:
void resetZoom();
Expand Down
4 changes: 2 additions & 2 deletions src/dialogs/PreferencesDialog.ui
Expand Up @@ -2719,7 +2719,7 @@ or arriving in </string>
<item>
<widget class="QCheckBox" name="btnCongestionShowRing">
<property name="text">
<string>Show Ring</string>
<string>show ring</string>
</property>
<property name="checkable">
<bool>true</bool>
Expand All @@ -2732,7 +2732,7 @@ or arriving in </string>
<item>
<widget class="QCheckBox" name="btnCongestionShowGlow">
<property name="text">
<string>Show Glow</string>
<string>show glow</string>
</property>
<property name="checkable">
<bool>true</bool>
Expand Down

0 comments on commit d8e314f

Please sign in to comment.