From d681b99c104c1462e0d9b90935511d4ee24c0978 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Thu, 19 Jan 2023 10:10:41 +0100 Subject: [PATCH] Disable "Search"/"Arrange options" ImGui dialog, when some of gizmos is active --- src/slic3r/GUI/GLCanvas3D.cpp | 2 +- src/slic3r/GUI/Plater.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 81194038e..41bd3a5c5 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -4745,7 +4745,7 @@ bool GLCanvas3D::_init_main_toolbar() }; item.left.action_callback = GLToolbarItem::Default_Action_Callback; item.visibility_callback = GLToolbarItem::Default_Visibility_Callback; - item.enabling_callback = GLToolbarItem::Default_Enabling_Callback; + item.enabling_callback = [this]()->bool { return m_gizmos.get_current_type() == GLGizmosManager::Undefined; }; if (!m_main_toolbar.add_item(item)) return false; diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 6e63c5634..1b2198111 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -5015,8 +5015,7 @@ bool Plater::priv::can_split_to_volumes() const bool Plater::priv::can_arrange() const { if (model.objects.empty() || !m_worker.is_idle()) return false; - if (q->canvas3D()->get_gizmos_manager().get_current_type() == GLGizmosManager::Emboss) return false; - return true; + return q->canvas3D()->get_gizmos_manager().get_current_type() == GLGizmosManager::Undefined; } bool Plater::priv::can_layers_editing() const