mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-15 03:46:05 +08:00
Follow-up of 450e430ca1b5169ab59d39a62cc84c4db3b0a8fa - Fixed wrong if() conditions into Plater::priv::reload_from_disk()
This commit is contained in:
parent
8df5202e74
commit
1ba189b3a8
@ -3674,16 +3674,16 @@ void Plater::priv::reload_from_disk()
|
|||||||
}
|
}
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (new_object_idx < 0 && (int)new_model.objects.size() <= new_object_idx) {
|
if (new_object_idx < 0 || int(new_model.objects.size()) <= new_object_idx) {
|
||||||
fail_list.push_back(from_u8(has_source ? old_volume->source.input_file : old_volume->name));
|
fail_list.push_back(from_u8(has_source ? old_volume->source.input_file : old_volume->name));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ModelObject* new_model_object = new_model.objects[new_object_idx];
|
ModelObject* new_model_object = new_model.objects[new_object_idx];
|
||||||
if (new_volume_idx < 0 && (int)new_model.objects.size() <= new_volume_idx) {
|
if (new_volume_idx < 0 || int(new_model_object->volumes.size()) <= new_volume_idx) {
|
||||||
fail_list.push_back(from_u8(has_source ? old_volume->source.input_file : old_volume->name));
|
fail_list.push_back(from_u8(has_source ? old_volume->source.input_file : old_volume->name));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (new_volume_idx < (int)new_model_object->volumes.size()) {
|
|
||||||
old_model_object->add_volume(*new_model_object->volumes[new_volume_idx]);
|
old_model_object->add_volume(*new_model_object->volumes[new_volume_idx]);
|
||||||
ModelVolume* new_volume = old_model_object->volumes.back();
|
ModelVolume* new_volume = old_model_object->volumes.back();
|
||||||
new_volume->set_new_unique_id();
|
new_volume->set_new_unique_id();
|
||||||
@ -3709,7 +3709,6 @@ void Plater::priv::reload_from_disk()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
for (size_t i = 0; i < replace_paths.size(); ++i) {
|
for (size_t i = 0; i < replace_paths.size(); ++i) {
|
||||||
const auto& path = replace_paths[i].string();
|
const auto& path = replace_paths[i].string();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user