hasFinished should return true if there is no path

This commit is contained in:
Emma Broman
2020-11-19 16:00:37 +01:00
parent 737e478809
commit 79a42702cd

View File

@@ -177,6 +177,10 @@ const SceneGraphNode* AutoNavigationHandler::anchor() const {
}
bool AutoNavigationHandler::hasFinished() const {
if (_pathSegments.empty()) {
return true;
}
unsigned int lastIndex = (unsigned int)_pathSegments.size() - 1;
return _currentSegmentIndex > lastIndex;
}