diff --git a/src/libslic3r/Technologies.hpp b/src/libslic3r/Technologies.hpp index 065500cff2..cef3eedd15 100644 --- a/src/libslic3r/Technologies.hpp +++ b/src/libslic3r/Technologies.hpp @@ -25,8 +25,6 @@ #define ENABLE_ENSURE_ON_BED_WHILE_SCALING (1 && ENABLE_MODELVOLUME_TRANSFORM) // All rotations made using the rotate gizmo are done with respect to the world reference system #define ENABLE_WORLD_ROTATIONS (1 && ENABLE_1_42_0) -// Enables shortcut keys for gizmos -#define ENABLE_GIZMOS_SHORTCUT (1 && ENABLE_1_42_0) // Scene's GUI made using imgui library #define ENABLE_IMGUI (1 && ENABLE_1_42_0) // Modified Sla support gizmo diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 0c17cd371b..68e12d35b2 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -2738,7 +2738,6 @@ bool GLCanvas3D::Gizmos::is_running() const return (curr != nullptr) ? (curr->get_state() == GLGizmoBase::On) : false; } -#if ENABLE_GIZMOS_SHORTCUT bool GLCanvas3D::Gizmos::handle_shortcut(int key, const Selection& selection) { if (!m_enabled) @@ -2773,7 +2772,6 @@ bool GLCanvas3D::Gizmos::handle_shortcut(int key, const Selection& selection) return handled; } -#endif // ENABLE_GIZMOS_SHORTCUT bool GLCanvas3D::Gizmos::is_dragging() const { @@ -4487,14 +4485,12 @@ void GLCanvas3D::on_char(wxKeyEvent& evt) #endif // ENABLE_MODIFIED_CAMERA_TARGET default: { -#if ENABLE_GIZMOS_SHORTCUT if (m_gizmos.handle_shortcut(keyCode, m_selection)) { _update_gizmos_data(); m_dirty = true; } else -#endif // ENABLE_GIZMOS_SHORTCUT evt.Skip(); break; diff --git a/src/slic3r/GUI/GLCanvas3D.hpp b/src/slic3r/GUI/GLCanvas3D.hpp index fdc3b40083..7270d87579 100644 --- a/src/slic3r/GUI/GLCanvas3D.hpp +++ b/src/slic3r/GUI/GLCanvas3D.hpp @@ -630,9 +630,7 @@ private: EType get_current_type() const; bool is_running() const; -#if ENABLE_GIZMOS_SHORTCUT bool handle_shortcut(int key, const Selection& selection); -#endif // ENABLE_GIZMOS_SHORTCUT bool is_dragging() const; void start_dragging(const Selection& selection); diff --git a/src/slic3r/GUI/GLGizmo.cpp b/src/slic3r/GUI/GLGizmo.cpp index bc00de23c0..b5f78362be 100644 --- a/src/slic3r/GUI/GLGizmo.cpp +++ b/src/slic3r/GUI/GLGizmo.cpp @@ -26,9 +26,7 @@ #include "I18N.hpp" #include "PresetBundle.hpp" -#if ENABLE_GIZMOS_SHORTCUT #include -#endif // ENABLE_GIZMOS_SHORTCUT // TODO: Display tooltips quicker on Linux @@ -161,9 +159,7 @@ GLGizmoBase::GLGizmoBase(GLCanvas3D& parent) : m_parent(parent) , m_group_id(-1) , m_state(Off) -#if ENABLE_GIZMOS_SHORTCUT , m_shortcut_key(0) -#endif // ENABLE_GIZMOS_SHORTCUT , m_hover_id(-1) , m_dragging(false) #if ENABLE_IMGUI @@ -734,9 +730,7 @@ bool GLGizmoRotate3D::on_init() if (!m_textures[On].load_from_file(path + "rotate_on.png", false)) return false; -#if ENABLE_GIZMOS_SHORTCUT m_shortcut_key = WXK_CONTROL_R; -#endif // ENABLE_GIZMOS_SHORTCUT return true; } @@ -824,9 +818,7 @@ bool GLGizmoScale3D::on_init() m_grabbers[2].angles(0) = half_pi; m_grabbers[3].angles(0) = half_pi; -#if ENABLE_GIZMOS_SHORTCUT m_shortcut_key = WXK_CONTROL_S; -#endif // ENABLE_GIZMOS_SHORTCUT return true; } @@ -1202,9 +1194,7 @@ bool GLGizmoMove3D::on_init() m_grabbers.push_back(Grabber()); } -#if ENABLE_GIZMOS_SHORTCUT m_shortcut_key = WXK_CONTROL_M; -#endif // ENABLE_GIZMOS_SHORTCUT return true; } @@ -1430,9 +1420,7 @@ bool GLGizmoFlatten::on_init() if (!m_textures[On].load_from_file(path + "layflat_on.png", false)) return false; -#if ENABLE_GIZMOS_SHORTCUT m_shortcut_key = WXK_CONTROL_F; -#endif // ENABLE_GIZMOS_SHORTCUT return true; } @@ -1769,9 +1757,7 @@ bool GLGizmoSlaSupports::on_init() if (!m_textures[On].load_from_file(path + "sla_support_points_on.png", false)) return false; -#if ENABLE_GIZMOS_SHORTCUT m_shortcut_key = WXK_CONTROL_L; -#endif // ENABLE_GIZMOS_SHORTCUT return true; } @@ -2292,9 +2278,7 @@ bool GLGizmoCut::on_init() m_grabbers.emplace_back(); -#if ENABLE_GIZMOS_SHORTCUT m_shortcut_key = WXK_CONTROL_C; -#endif // ENABLE_GIZMOS_SHORTCUT return true; } diff --git a/src/slic3r/GUI/GLGizmo.hpp b/src/slic3r/GUI/GLGizmo.hpp index d2d630081a..f695083994 100644 --- a/src/slic3r/GUI/GLGizmo.hpp +++ b/src/slic3r/GUI/GLGizmo.hpp @@ -84,9 +84,7 @@ protected: int m_group_id; EState m_state; -#if ENABLE_GIZMOS_SHORTCUT int m_shortcut_key; -#endif // ENABLE_GIZMOS_SHORTCUT // textures are assumed to be square and all with the same size in pixels, no internal check is done GLTexture m_textures[Num_States]; int m_hover_id; @@ -113,10 +111,8 @@ public: EState get_state() const { return m_state; } void set_state(EState state) { m_state = state; on_set_state(); } -#if ENABLE_GIZMOS_SHORTCUT int get_shortcut_key() const { return m_shortcut_key; } void set_shortcut_key(int key) { m_shortcut_key = key; } -#endif // ENABLE_GIZMOS_SHORTCUT bool is_activable(const GLCanvas3D::Selection& selection) const { return on_is_activable(selection); } bool is_selectable() const { return on_is_selectable(); }