diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 6c924f1fa..8f584942c 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -3896,12 +3896,13 @@ void GLCanvas3D::do_rotate(const std::string& snapshot_type) for (int i = 0; i < static_cast(m_model->objects.size()); ++i) { const ModelObject* obj = m_model->objects[i]; for (int j = 0; j < static_cast(obj->instances.size()); ++j) { - if (snapshot_type.empty() && m_selection.get_object_idx() == i) { + if (snapshot_type == L("Gizmo-Place on Face") && m_selection.get_object_idx() == i) { // This means we are flattening this object. In that case pretend // that it is not sinking (even if it is), so it is placed on bed // later on (whatever is sinking will be left sinking). min_zs[{ i, j }] = SINKING_Z_THRESHOLD; - } else + } + else min_zs[{ i, j }] = obj->instance_bounding_box(j).min.z(); } diff --git a/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp b/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp index b427d1ab4..3af58dd96 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoFlatten.cpp @@ -43,25 +43,18 @@ bool GLGizmoFlatten::on_mouse(const wxMouseEvent &mouse_event) } return true; } - - // fix: prevent restart gizmo when reselect object - // take responsibility for left up - if (m_parent.get_first_hover_volume_idx() >= 0) m_mouse_left_down = true; - - } else if (mouse_event.LeftUp()) { - if (m_mouse_left_down) { - if (m_hover_id == -1) - // no plane hovered - return false; - else { - // responsible for mouse left up after selecting plane - m_mouse_left_down = false; - return true; - } - } - } else if (mouse_event.Leaving()) { - m_mouse_left_down = false; } + else if (mouse_event.LeftUp()) { + if (m_mouse_left_down) { + // responsible for mouse left up after selecting plane + m_mouse_left_down = false; + return true; + } + + } + else if (mouse_event.Leaving()) + m_mouse_left_down = false; + return false; }