Use elevated model priority during initial load

This commit is contained in:
Simon Walton 2018-08-10 18:16:08 -07:00
parent 0ae86d5aa8
commit 829b83c61d
2 changed files with 5 additions and 0 deletions

View file

@ -45,6 +45,7 @@ void SafeLanding::startEntitySequence(QSharedPointer<EntityTreeRenderer> entityT
_sequenceNumbers.clear();
_initialStart = INVALID_SEQUENCE;
_initialEnd = INVALID_SEQUENCE;
EntityTreeRenderer::setEntityLoadingPriorityFunction(&ElevatedPriority);
}
}
}
@ -106,6 +107,7 @@ bool SafeLanding::isLoadSequenceComplete() {
_initialStart = INVALID_SEQUENCE;
_initialEnd = INVALID_SEQUENCE;
_entityTree = nullptr;
EntityTreeRenderer::setEntityLoadingPriorityFunction(StandardPriority);
qCDebug(interfaceapp) << "Safe Landing: load sequence complete";
}

View file

@ -57,6 +57,9 @@ private:
std::set<int, SequenceLessThan> _sequenceNumbers;
std::set<QString> _trackedURLs;
static float ElevatedPriority(const EntityItem&) { return 10.0f; }
static float StandardPriority(const EntityItem&) { return 0.0f; }
static const int SEQUENCE_MODULO;
};