From bb8a0019639dcaf8b4056fd4e4808c47a08d880b Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Tue, 10 Jan 2023 08:25:05 +0100 Subject: [PATCH] Replace abf918e7281d912f7d432b8fb460f8599b2db604 with a better fix --- src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp | 3 ++- src/slic3r/GUI/Selection.cpp | 13 +++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp index 5651ac190..87c72b646 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoEmboss.cpp @@ -300,7 +300,8 @@ bool GLGizmoEmboss::on_mouse_for_rotation(const wxMouseEvent &mouse_event) angle -= PI / 2; // Grabber is upward // temporary rotation - TransformationType transformation_type = TransformationType::Local_Relative_Joint; + const TransformationType transformation_type = m_parent.get_selection().is_single_text() ? + TransformationType::Local_Relative_Joint : TransformationType::World_Relative_Joint; m_parent.get_selection().rotate(Vec3d(0., 0., angle), transformation_type); angle += *m_rotate_start_angle; diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index 9fb232c7e..fda11421f 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -2176,16 +2176,9 @@ void Selection::update_type() unsigned int instances_count = (unsigned int)model_object->instances.size(); if (volumes_count * instances_count == 1) { const ModelVolume* model_volume = model_object->volumes[first->volume_idx()]; - if (model_volume->text_configuration.has_value()) { // text volume - m_type = SingleVolume; - // ensures the correct mode is selected - m_mode = Volume; - } - else { - m_type = SingleFullObject; - // ensures the correct mode is selected - m_mode = Instance; - } + m_type = SingleFullObject; + // ensures the correct mode is selected + m_mode = Instance; } else if (volumes_count == 1) { // instances_count > 1 m_type = SingleFullInstance;