Fixed sinking object popping up on bed when adding a modifier
This commit is contained in:
parent
f27448f322
commit
67bc29299a
@ -959,8 +959,12 @@ void ModelObject::ensure_on_bed(bool allow_negative_z)
|
|||||||
double z_offset = 0.0;
|
double z_offset = 0.0;
|
||||||
|
|
||||||
if (allow_negative_z) {
|
if (allow_negative_z) {
|
||||||
if (parts_count() == 1)
|
if (parts_count() == 1) {
|
||||||
z_offset = -get_min_z();
|
const double min_z = get_min_z();
|
||||||
|
const double max_z = get_max_z();
|
||||||
|
if (min_z >= SINKING_Z_THRESHOLD || max_z < 0.0)
|
||||||
|
z_offset = -min_z;
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
const double max_z = get_max_z();
|
const double max_z = get_max_z();
|
||||||
if (max_z < SINKING_MIN_Z_THRESHOLD)
|
if (max_z < SINKING_MIN_Z_THRESHOLD)
|
||||||
|
Loading…
Reference in New Issue
Block a user