forked from qt-creator/qt-creator
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:
@@ -64,8 +64,9 @@ GeneralHelper::GeneralHelper()
|
||||
|
||||
void GeneralHelper::requestOverlayUpdate()
|
||||
{
|
||||
if (!m_overlayUpdateTimer.isActive())
|
||||
m_overlayUpdateTimer.start();
|
||||
// Restart the timer on each request in attempt to ensure there's one frame between the last
|
||||
// request and actual update.
|
||||
m_overlayUpdateTimer.start();
|
||||
}
|
||||
|
||||
QString GeneralHelper::generateUniqueName(const QString &nameRoot)
|
||||
|
Reference in New Issue
Block a user