Skip to content

Commit

Permalink
Delay main view update until the next frame
Browse files Browse the repository at this point in the history
This improves a lot the responsiveness of mac touchpad.  Still not as
smooth as with a mouse though, but almost good enough (on my Macbook
air).

I am not totally sure why this works to be honest, but it's not too bad
to use a singleShot(0, ...) call since it clearly shows the intent
that is to render as soon as possible after the current frame.
  • Loading branch information
guillaumechereau committed Mar 22, 2018
1 parent 92fdc03 commit ba928ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/StelMainView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ void StelMainView::drawEnded()
{
updateQueued = true;
minFpsTimer->stop();
glWidget->update();
QTimer::singleShot(0, glWidget, SLOT(update()));
}
else
{
Expand Down Expand Up @@ -1328,7 +1328,7 @@ void StelMainView::minFPSUpdate()
{
updateQueued = true;
//qDebug()<<"minFPSUpdate";
glWidget->update();
QTimer::singleShot(0, glWidget, SLOT(update()));
}
else
{
Expand Down

0 comments on commit ba928ed

Please sign in to comment.