Allow drop of sunken objects (#14243)

This commit is contained in:
Vovodroid
2026-06-17 00:13:10 +03:00
committed by GitHub
parent e700113b39
commit 5a6e31ac5b
2 changed files with 2 additions and 2 deletions

View File

@@ -2130,7 +2130,7 @@ void MenuFactory::append_menu_item_drop(wxMenu* menu)
if (plater()->canvas3D()->get_canvas_type() != GLCanvas3D::ECanvasType::CanvasView3D)
return false;
else {
return (plater()->get_view3D_canvas3D()->get_selection().get_bounding_box().min.z() > SINKING_Z_THRESHOLD);
return (std::abs(plater()->get_view3D_canvas3D()->get_selection().get_bounding_box().min.z()) > -SINKING_Z_THRESHOLD);
} //disable if model is on the bed / not in View3D
}, m_parent);
}

View File

@@ -525,7 +525,7 @@ void Selection::center()
void Selection::drop()
{
if (this->get_bounding_box().min.z() < SINKING_Z_THRESHOLD) {
if (std::abs(this->get_bounding_box().min.z()) < -SINKING_Z_THRESHOLD) {
return; // shouldnt happen, but better check anyways, already checked in append_menu_item_drop()
}