mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-16 19:15:58 +08:00
Bugfix: Model::add_default_instances() was always return true
This commit is contained in:
parent
73f3bfb0da
commit
ea67f8ca4f
@ -185,12 +185,14 @@ bool
|
|||||||
Model::add_default_instances()
|
Model::add_default_instances()
|
||||||
{
|
{
|
||||||
// apply a default position to all objects not having one
|
// apply a default position to all objects not having one
|
||||||
for (ModelObjectPtrs::const_iterator o = this->objects.begin(); o != this->objects.end(); ++o) {
|
bool added = false;
|
||||||
if ((*o)->instances.empty()) {
|
for (ModelObject* o : this->objects) {
|
||||||
(*o)->add_instance();
|
if (o->instances.empty()) {
|
||||||
|
o->add_instance();
|
||||||
|
added = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return added;
|
||||||
}
|
}
|
||||||
|
|
||||||
// this returns the bounding box of the *transformed* instances
|
// this returns the bounding box of the *transformed* instances
|
||||||
|
Loading…
x
Reference in New Issue
Block a user