diff options
author | Enrico Turri <enricoturri@seznam.cz> | 2020-01-17 16:58:19 +0300 |
---|---|---|
committer | Enrico Turri <enricoturri@seznam.cz> | 2020-01-17 16:58:19 +0300 |
commit | b368f8ff24452ed1e4b3db804e8405ca2123ec63 (patch) | |
tree | 0bea4695bbbd6fa43b61002ab31318aed158138b /src/slic3r/GUI/Gizmos | |
parent | 02aa6294494bc491e0a3294a6c301c24c2574297 (diff) | |
parent | acb825cf1e5aafa9bbe5ce50e2bf9fd1cd517fed (diff) |
Fixed conflicts after merge with master
Diffstat (limited to 'src/slic3r/GUI/Gizmos')
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoMove.cpp | 2 | ||||
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoMove.hpp | 2 | ||||
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp | 2 | ||||
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp | 2 | ||||
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmoScale.cpp | 4 | ||||
-rw-r--r-- | src/slic3r/GUI/Gizmos/GLGizmosManager.cpp | 10 |
6 files changed, 0 insertions, 22 deletions
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMove.cpp b/src/slic3r/GUI/Gizmos/GLGizmoMove.cpp index 925727e76..6be108c85 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMove.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMove.cpp @@ -48,12 +48,10 @@ std::string GLGizmoMove3D::on_get_name() const return (_(L("Move")) + " [M]").ToUTF8().data(); } -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE bool GLGizmoMove3D::on_is_activable() const { return !m_parent.get_selection().is_empty(); } -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE void GLGizmoMove3D::on_start_dragging() { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoMove.hpp b/src/slic3r/GUI/Gizmos/GLGizmoMove.hpp index 19958615e..b2367ac68 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoMove.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoMove.hpp @@ -33,9 +33,7 @@ public: protected: virtual bool on_init(); virtual std::string on_get_name() const; -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE virtual bool on_is_activable() const; -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE virtual void on_start_dragging(); virtual void on_stop_dragging(); virtual void on_update(const UpdateData& data); diff --git a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp index 5d3b6f365..9a0d75033 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoRotate.cpp @@ -449,12 +449,10 @@ std::string GLGizmoRotate3D::on_get_name() const return (_(L("Rotate")) + " [R]").ToUTF8().data(); } -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE bool GLGizmoRotate3D::on_is_activable() const { return !m_parent.get_selection().is_empty(); } -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE void GLGizmoRotate3D::on_start_dragging() { diff --git a/src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp b/src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp index 930a76e2e..6e7bf1a09 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoRotate.hpp @@ -104,9 +104,7 @@ protected: if (id < 3) m_gizmos[id].disable_grabber(0); } -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE virtual bool on_is_activable() const; -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE virtual void on_start_dragging(); virtual void on_stop_dragging(); virtual void on_update(const UpdateData& data) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp b/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp index fa49b06ce..b4972e6fa 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoScale.cpp @@ -49,12 +49,8 @@ std::string GLGizmoScale3D::on_get_name() const bool GLGizmoScale3D::on_is_activable() const { -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE const Selection& selection = m_parent.get_selection(); return !selection.is_empty() && !selection.is_wipe_tower(); -#else - return !m_parent.get_selection().is_wipe_tower(); -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE } void GLGizmoScale3D::on_start_dragging() diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp index ed8d16aa2..31822354f 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp @@ -881,11 +881,7 @@ void GLGizmosManager::do_render_overlay() const if ((icons_texture_id == 0) || (tex_width <= 1) || (tex_height <= 1)) return; -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE float du = (float)(tex_width - 1) / (4.0f * (float)tex_width); // 4 is the number of possible states if the icons -#else - float du = (float)(tex_width - 1) / (3.0f * (float)tex_width); // 3 is the number of possible states if the icons -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE float dv = (float)(tex_height - 1) / (float)(m_gizmos.size() * tex_height); // tiles in the texture are spaced by 1 pixel @@ -908,11 +904,7 @@ void GLGizmosManager::do_render_overlay() const GLGizmoBase* gizmo = m_gizmos[idx].get(); unsigned int sprite_id = gizmo->get_sprite_id(); -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE int icon_idx = (m_current == idx) ? 2 : ((m_hover == idx) ? 1 : (gizmo->is_activable()? 0 : 3)); -#else - int icon_idx = m_current == idx ? 2 : (m_hover == idx ? 1 : 0); -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE #if ENABLE_MODIFIED_TOOLBAR_TEXTURES float v_top = v_offset + sprite_id * dv; @@ -971,9 +963,7 @@ bool GLGizmosManager::generate_icons_texture() const states.push_back(std::make_pair(1, false)); // Activable states.push_back(std::make_pair(0, false)); // Hovered states.push_back(std::make_pair(0, true)); // Selected -#if ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE states.push_back(std::make_pair(2, false)); // Disabled -#endif // ENABLE_GIZMO_ICONS_NON_ACTIVABLE_STATE unsigned int sprite_size_px = (unsigned int)m_layout.scaled_icons_size(); // // force even size |