FIX:ban wipe_tower in measure and assembly gizmo

jira: STUDIO-7860
Change-Id: I6c02d970007719110ac627b1c0f1435b229e9854
This commit is contained in:
zhou.xu 2024-08-14 18:09:50 +08:00 committed by Lane.Wei
parent e3a7ad0548
commit 512da73aae
2 changed files with 6 additions and 0 deletions

View File

@ -44,6 +44,9 @@ std::string GLGizmoAssembly::on_get_name() const
bool GLGizmoAssembly::on_is_activable() const
{
const Selection& selection = m_parent.get_selection();
if (selection.is_wipe_tower()) {
return false;
}
const int selection_volumes_count = 2;
if (wxGetApp().plater()->canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasAssembleView) {
if (abs(m_parent.get_explosion_ratio() - 1.0f) < 1e-2 && selection.volumes_count() >= selection_volumes_count) {

View File

@ -493,6 +493,9 @@ std::string GLGizmoMeasure::on_get_name() const
bool GLGizmoMeasure::on_is_activable() const
{
const Selection& selection = m_parent.get_selection();
if (selection.is_wipe_tower()) {
return false;
}
if (wxGetApp().plater()->canvas3D()->get_canvas_type() == GLCanvas3D::ECanvasType::CanvasAssembleView) {
if (abs(m_parent.get_explosion_ratio() - 1.0f) < 1e-2 && selection.volumes_count() > 0) {
return true;