Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/core/StelApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1170,8 +1170,13 @@ void StelApp::handleClick(QMouseEvent* inputEvent)
if (viewportEffect)
viewportEffect->distortXY(x, y);

QMouseEvent event(inputEvent->type(), QPoint(qRound(x*devicePixelsPerPixel), qRound(y*devicePixelsPerPixel)), inputEvent->button(), inputEvent->buttons(), inputEvent->modifiers());
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
QMouseEvent event(inputEvent->type(), QPointF(x*devicePixelsPerPixel, y*devicePixelsPerPixel), inputEvent->globalPosition(), inputEvent->button(), inputEvent->buttons(), inputEvent->modifiers());
event.setAccepted(false);
#else
QMouseEvent event(inputEvent->type(), QPoint(qRound(x*devicePixelsPerPixel), qRound(y*devicePixelsPerPixel)), inputEvent->button(), inputEvent->buttons(), inputEvent->modifiers());
event.setAccepted(false);
#endif

// Send the event to every StelModule
for (auto* i : moduleMgr->getCallOrders(StelModule::ActionHandleMouseClicks))
Expand Down
Loading