Remember that std::vector<>.size() needs to be offset by 1 if it's being used to find the last index.

This commit is contained in:
Joseph Lenox 2018-05-06 19:37:25 -05:00
parent 10f4bf9be9
commit 2e74c9f3ad

View File

@ -244,7 +244,7 @@ std::vector<int> Plater::load_model_objects(ModelObjectPtrs model_objects) {
tmpobj.identifier = (this->object_identifier)++; tmpobj.identifier = (this->object_identifier)++;
this->objects.push_back(tmpobj); this->objects.push_back(tmpobj);
obj_idx.push_back(this->objects.size()); obj_idx.push_back(this->objects.size() - 1);
Slic3r::Log::info(LogChannel, LOG_WSTRING("Object array new size: " << this->objects.size())); Slic3r::Log::info(LogChannel, LOG_WSTRING("Object array new size: " << this->objects.size()));
Slic3r::Log::info(LogChannel, LOG_WSTRING("Instances: " << obj->instances.size())); Slic3r::Log::info(LogChannel, LOG_WSTRING("Instances: " << obj->instances.size()));