From c7e23a5a5ff47bb016d643fca221f9cf387c2911 Mon Sep 17 00:00:00 2001 From: enricoturri1966 Date: Mon, 12 Dec 2022 08:40:39 +0100 Subject: [PATCH] Follow-up of cd6808fc73c5ec58e31836a0350c9e5bfd8025df --- src/slic3r/GUI/GUI_ObjectManipulation.cpp | 6 +++--- src/slic3r/GUI/Selection.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index d5660da59..7a5167d4a 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -565,15 +565,15 @@ void ObjectManipulation::Show(const bool show) bool show_world_local_combo = wxGetApp().get_mode() != comSimple && (selection.is_single_full_instance() || selection.is_single_volume_or_modifier()); if (selection.is_single_volume_or_modifier() && m_word_local_combo->GetCount() < 3) { #ifdef __linux__ - m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Instance), 1); + m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Local), 2); #else - m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Instance), wxNullBitmap, 1); + m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Local), wxNullBitmap, 2); #endif // __linux__ m_word_local_combo->Select((int)ECoordinatesType::World); this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection())); } else if (selection.is_single_full_instance() && m_word_local_combo->GetCount() > 2) { - m_word_local_combo->Delete(1); + m_word_local_combo->Delete(2); m_word_local_combo->Select((int)ECoordinatesType::World); this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection())); } diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp index 291688c4b..24b7d56fb 100644 --- a/src/slic3r/GUI/Selection.cpp +++ b/src/slic3r/GUI/Selection.cpp @@ -828,7 +828,7 @@ void Selection::translate(const Vec3d& displacement, TransformationType transfor assert(is_from_fully_selected_instance(i)); if (transformation_type.world()) v.set_instance_transformation(Geometry::translation_transform(displacement) * volume_data.get_instance_full_matrix()); - else if (transformation_type.local()) { + else if (transformation_type.instance()) { const Vec3d world_displacement = volume_data.get_instance_rotation_matrix() * displacement; v.set_instance_transformation(Geometry::translation_transform(world_displacement) * volume_data.get_instance_full_matrix()); } @@ -918,7 +918,7 @@ void Selection::rotate(const Vec3d& rotation, TransformationType transformation_ else { if (transformation_type.world()) new_rotation_matrix = rotation_matrix * inst_trafo.get_rotation_matrix(); - else if (transformation_type.local()) + else if (transformation_type.instance()) new_rotation_matrix = inst_trafo.get_rotation_matrix() * rotation_matrix; else assert(false); @@ -948,7 +948,7 @@ void Selection::rotate(const Vec3d& rotation, TransformationType transformation_ SyncRotationType synch; if (transformation_type.world() && rot_axis_max == 2) synch = SyncRotationType::NONE; - else if (transformation_type.local()) + else if (transformation_type.instance()) synch = SyncRotationType::FULL; else synch = SyncRotationType::GENERAL; @@ -1365,7 +1365,7 @@ void Selection::scale_and_translate(const Vec3d& scale, const Vec3d& translation Geometry::translation_transform(translation) * inst_trafo.get_offset_matrix(); v.set_instance_transformation(offset_matrix * scale_matrix * inst_trafo.get_matrix_no_offset()); } - else if (transformation_type.local()) { + else if (transformation_type.instance()) { const Transform3d scale_matrix = Geometry::scale_transform(relative_scale); Vec3d offset; if (transformation_type.joint() && translation.isApprox(Vec3d::Zero())) {