Skip to content

Commit

Permalink
Fixed the way cursors are set
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLazarescu committed Aug 18, 2023
1 parent 820be2a commit 2ef79cb
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/presentation/modules/CppElements/page_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,16 @@ void PageItem::hoverMoveEvent(QHoverEvent* event)

if(pointIsAboveText(mouseX, mouseY))
{
QApplication::setOverrideCursor(Qt::IBeamCursor);
if(QApplication::overrideCursor() == nullptr ||
*QApplication::overrideCursor() != Qt::IBeamCursor)
{
QApplication::setOverrideCursor(Qt::IBeamCursor);
}
}
else
else if(QApplication::overrideCursor() != nullptr &&
*QApplication::overrideCursor() == Qt::IBeamCursor)
{
QApplication::setOverrideCursor(Qt::ArrowCursor);
QApplication::restoreOverrideCursor();
}
}

Expand Down

0 comments on commit 2ef79cb

Please sign in to comment.