QmlDesigner: Restart overlay update timer on each request

If timer is not restarted on each request, the update can end up
happening before the next frame has been rendered. This can happen e.g.
at puppet startup, where the delay between first request and first
frame render can easily be more than 16ms.

Change-Id: Ib9555548e8c60799c585d0ab43d0626cfa31a494
Fixes: QDS-2082
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2020-05-15 13:15:23 +03:00
parent cfa8373ce0
commit b2b590ae24

View File

@@ -64,7 +64,8 @@ GeneralHelper::GeneralHelper()
void GeneralHelper::requestOverlayUpdate()
{
if (!m_overlayUpdateTimer.isActive())
// Restart the timer on each request in attempt to ensure there's one frame between the last
// request and actual update.
m_overlayUpdateTimer.start();
}