Commit 253a2f7c authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

QML Observer: Reduced refresh time for debug id updates

parent 925182ff
......@@ -53,7 +53,7 @@
namespace QmlViewer {
const int SceneChangeUpdateInterval = 5000;
const int MaxSceneChangedTimerRestartCount = (SceneChangeUpdateInterval / 100);
const int MaxSceneChangedTimerRestartCount = 15;
Q_GLOBAL_STATIC(QDeclarativeDesignDebugServer, qmlDesignDebugServer)
......@@ -538,15 +538,16 @@ void QDeclarativeDesignViewPrivate::_q_sceneChanged(const QList<QRectF> & /*area
sceneChangedTimerRestartCount++;
if (sceneChangedTimerRestartCount == MaxSceneChangedTimerRestartCount) {
sceneChangedTimerRestartCount = 0;
_q_checkSceneItemCount();
}
sceneChangedTimer.start();
}
void QDeclarativeDesignViewPrivate::_q_checkSceneItemCount()
{
bool hasNewItems = hasNewGraphicsObjects(q->rootObject());
sceneChangedTimerRestartCount = 0;
if (hasNewItems) {
qmlDesignDebugServer()->sceneItemCountChanged();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment