diff --git a/resources/icons/collapse_btn.svg b/resources/icons/collapse_btn.svg
new file mode 100644
index 0000000000..4ee221a44a
--- /dev/null
+++ b/resources/icons/collapse_btn.svg
@@ -0,0 +1,13 @@
+
+
+
\ No newline at end of file
diff --git a/resources/icons/expand_btn.svg b/resources/icons/expand_btn.svg
new file mode 100644
index 0000000000..32d7f99595
--- /dev/null
+++ b/resources/icons/expand_btn.svg
@@ -0,0 +1,12 @@
+
+
+
diff --git a/src/imgui/imconfig.h b/src/imgui/imconfig.h
index 9a29789d33..f9fdf575b9 100644
--- a/src/imgui/imconfig.h
+++ b/src/imgui/imconfig.h
@@ -170,6 +170,8 @@ namespace ImGui
const wchar_t LegendShells = 0x2616;
const wchar_t LegendToolMarker = 0x2617;
const wchar_t WarningMarkerSmall = 0x2618;
+ const wchar_t ExpandBtn = 0x2619;
+ const wchar_t CollapseBtn = 0x2620;
// void MyFunction(const char* name, const MyMatrix44& v);
}
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp
index 21917b1d66..71a8bd5ba6 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmoCut.cpp
@@ -783,6 +783,17 @@ bool GLGizmoCut3D::on_init()
m_grabbers.emplace_back();
m_shortcut_key = WXK_CONTROL_C;
+ // initiate info shortcuts
+ const wxString ctrl = GUI::shortkey_ctrl_prefix();
+ const wxString alt = GUI::shortkey_alt_prefix();
+
+ m_shortcuts.push_back(std::make_pair(_L("Left click"), _L("Add connector")));
+ m_shortcuts.push_back(std::make_pair(_L("Right click"), _L("Remove connector")));
+ m_shortcuts.push_back(std::make_pair(_L("Drag"), _L("Move connector")));
+ m_shortcuts.push_back(std::make_pair(ctrl + _L("Left click"), _L("Add connector to selection")));
+ m_shortcuts.push_back(std::make_pair(alt + _L("Left click"), _L("Remove connector from selection")));
+ m_shortcuts.push_back(std::make_pair(ctrl + "A", _L("Select all connectors")));
+
return true;
}
@@ -1258,7 +1269,18 @@ void GLGizmoCut3D::on_render_input_window(float x, float y, float bottom_limit)
if (m_imgui->button(_L("Add/Edit connectors")))
m_connectors_editing = true;
m_imgui->disabled_end();
- } else { // connectors mode
+ }
+ else { // connectors mode
+ if (m_imgui->button("? " + (m_show_shortcuts ? wxString(ImGui::CollapseBtn) : wxString(ImGui::ExpandBtn))))
+ m_show_shortcuts = !m_show_shortcuts;
+
+ if (m_show_shortcuts)
+ for (const auto& shortcut : m_shortcuts ){
+ m_imgui->text_colored(ImGuiWrapper::COL_ORANGE_LIGHT, shortcut.first);
+ ImGui::SameLine(m_label_width);
+ m_imgui->text(shortcut.second);
+ }
+
m_imgui->disabled_begin(!m_keep_lower || !m_keep_upper);
// Connectors section
ImGui::Separator();
@@ -1778,6 +1800,10 @@ bool GLGizmoCut3D::gizmo_event(SLAGizmoEventType action, const Vec2d& mouse_posi
return true;
}
+ else if (action == SLAGizmoEventType::SelectAll) {
+ std::fill(m_selected.begin(), m_selected.end(), true);
+ return true;
+ }
return false;
}
diff --git a/src/slic3r/GUI/Gizmos/GLGizmoCut.hpp b/src/slic3r/GUI/Gizmos/GLGizmoCut.hpp
index fecb3e846c..170928a07f 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmoCut.hpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmoCut.hpp
@@ -98,6 +98,9 @@ class GLGizmoCut3D : public GLGizmoBase
Matrix3d m_rotation_matrix;
Vec3d m_rotations{ Vec3d::Zero() };
+ bool m_show_shortcuts{ false };
+ std::vector> m_shortcuts;
+
enum class CutMode {
cutPlanar
, cutGrig
diff --git a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
index 09276ef57f..070417520b 100644
--- a/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
+++ b/src/slic3r/GUI/Gizmos/GLGizmosManager.cpp
@@ -505,7 +505,7 @@ bool GLGizmosManager::on_char(wxKeyEvent& evt)
#endif /* __APPLE__ */
{
// Sla gizmo selects all support points
- if ((m_current == SlaSupports || m_current == Hollow) && gizmo_event(SLAGizmoEventType::SelectAll))
+ if ((m_current == SlaSupports || m_current == Hollow || m_current == Cut) && gizmo_event(SLAGizmoEventType::SelectAll))
processed = true;
break;
diff --git a/src/slic3r/GUI/ImGuiWrapper.cpp b/src/slic3r/GUI/ImGuiWrapper.cpp
index 8c27db56e8..8b4befa773 100644
--- a/src/slic3r/GUI/ImGuiWrapper.cpp
+++ b/src/slic3r/GUI/ImGuiWrapper.cpp
@@ -76,6 +76,8 @@ static const std::map font_icons = {
#endif // ENABLE_LEGEND_TOOLBAR_ICONS
{ImGui::RevertButton , "undo" },
{ImGui::WarningMarkerSmall , "notification_warning" },
+ {ImGui::ExpandBtn , "expand_btn" },
+ {ImGui::CollapseBtn , "collapse_btn" },
};
static const std::map font_icons_large = {