From 5084d544a246063d315ae9ba000596726b2a7a67 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Mon, 29 Apr 2019 18:10:08 +0200 Subject: [PATCH] Fixed a bug, where std::string and wxString were mixed up. --- src/slic3r/GUI/GUI_ObjectManipulation.cpp | 7 +++++-- src/slic3r/GUI/GUI_ObjectManipulation.hpp | 12 ++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index d15779308..010291156 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -301,8 +301,8 @@ void ObjectManipulation::update_if_dirty() if (!m_dirty) return; - auto update_label = [](std::string &label_cache, const std::string &new_label, wxStaticText *widget) { - std::string new_label_localized = _(new_label) + ":"; + auto update_label = [](wxString &label_cache, const std::string &new_label, wxStaticText *widget) { + wxString new_label_localized = _(new_label) + ":"; if (label_cache != new_label_localized) { label_cache = new_label_localized; widget->SetLabel(new_label_localized); @@ -420,6 +420,8 @@ void ObjectManipulation::change_rotation_value(int axis, double value) transformation_type.set_local(); } + //FIXME if anisotropic scaling is required, and is_single_full_instance && m_world_coordinates, apply 90 degrees rotation of the rotation vector. + selection.start_dragging(); selection.rotate( (M_PI / 180.0) * (transformation_type.absolute() ? rotation : rotation - m_cache.rotation), @@ -490,6 +492,7 @@ void ObjectManipulation::do_scale(const Vec3d &scale) const TransformationType transformation_type(TransformationType::World_Relative_Joint); if (selection.is_single_full_instance() && ! m_world_coordinates) transformation_type.set_local(); + //FIXME if anisotropic scaling is required, and is_single_full_instance && m_world_coordinates, apply 90 degrees rotation of the scaling vector. selection.start_dragging(); selection.scale(scaling_factor * 0.01, transformation_type); wxGetApp().plater()->canvas3D()->do_scale(); diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.hpp b/src/slic3r/GUI/GUI_ObjectManipulation.hpp index a66576498..e93ce1ffb 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.hpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.hpp @@ -28,9 +28,9 @@ class ObjectManipulation : public OG_Settings Vec3d size; Vec3d size_rounded; - std::string move_label_string; - std::string rotate_label_string; - std::string scale_label_string; + wxString move_label_string; + wxString rotate_label_string; + wxString scale_label_string; struct Instance { @@ -55,9 +55,9 @@ class ObjectManipulation : public OG_Settings rotation = rotation_rounded = Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); scale = scale_rounded = Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); size = size_rounded = Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); - move_label_string = ""; - rotate_label_string = ""; - scale_label_string = ""; + move_label_string = wxString(); + rotate_label_string = wxString(); + scale_label_string = wxString(); instance.reset(); } bool is_valid() const { return position != Vec3d(DBL_MAX, DBL_MAX, DBL_MAX); }