diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index d430f3d2d..75c8cd125 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -133,7 +133,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) : // Settings table - m_og->append_line(add_og_to_object_settings(L("Position"), L("mm"))); + m_og->append_line(add_og_to_object_settings(L("Position"), L("mm")), &m_move_Label); m_og->append_line(add_og_to_object_settings(L("Rotation"), "°")); m_og->append_line(add_og_to_object_settings(L("Scale"), "mm")); @@ -181,6 +181,7 @@ int ObjectManipulation::ol_selection() void ObjectManipulation::update_settings_value(const GLCanvas3D::Selection& selection) { + wxString move_label = _(L("Position")); #if ENABLE_MODELVOLUME_TRANSFORM if (selection.is_single_full_instance() || selection.is_single_full_object()) #else @@ -245,9 +246,16 @@ void ObjectManipulation::update_settings_value(const GLCanvas3D::Selection& sele #endif // ENABLE_MODELVOLUME_TRANSFORM m_og->enable(); } + else if (wxGetApp().obj_list()->multiple_selection()) + { + reset_settings_value(); + move_label = _(L("Displacement")); + m_og->enable(); + } else reset_settings_value(); + m_move_Label->SetLabel(move_label); m_og->get_field("scale_unit")->disable();// temporary decision } diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.hpp b/src/slic3r/GUI/GUI_ObjectManipulation.hpp index 6ab76a83b..c67ac089c 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.hpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.hpp @@ -18,6 +18,7 @@ class ObjectManipulation : public OG_Settings bool m_is_uniform_scale = false; // It indicates if scale is uniform Vec3d cache_position { 0., 0., 0. }; + wxStaticText* m_move_Label = nullptr; public: ObjectManipulation(wxWindow* parent); diff --git a/src/slic3r/GUI/OptionsGroup.cpp b/src/slic3r/GUI/OptionsGroup.cpp index 4d70d529e..6f8b9c65c 100644 --- a/src/slic3r/GUI/OptionsGroup.cpp +++ b/src/slic3r/GUI/OptionsGroup.cpp @@ -106,7 +106,7 @@ void OptionsGroup::add_undo_buttuns_to_sizer(wxSizer* sizer, const t_field& fiel sizer->Add(field->m_Undo_btn, 0, wxALIGN_CENTER_VERTICAL); } -void OptionsGroup::append_line(const Line& line, wxStaticText** colored_Label/* = nullptr*/) { +void OptionsGroup::append_line(const Line& line, wxStaticText** full_Label/* = nullptr*/) { //! if (line.sizer != nullptr || (line.widget != nullptr && line.full_width > 0)) { if ( (line.sizer != nullptr || line.widget != nullptr) && line.full_width) { if (line.sizer != nullptr) { @@ -191,12 +191,13 @@ void OptionsGroup::append_line(const Line& line, wxStaticText** colored_Label/* label->SetToolTip(line.label_tooltip); } + if (full_Label != nullptr) + *full_Label = label; // Initiate the pointer to the control of the full label, if we need this one. // If there's a widget, build it and add the result to the sizer. if (line.widget != nullptr) { auto wgt = line.widget(parent()); // If widget doesn't have label, don't use border grid_sizer->Add(wgt, 0, wxEXPAND | wxBOTTOM | wxTOP, (wxOSX || line.label.IsEmpty()) ? 0 : 5); - if (colored_Label != nullptr) *colored_Label = label; return; } diff --git a/src/slic3r/GUI/OptionsGroup.hpp b/src/slic3r/GUI/OptionsGroup.hpp index c86ad0975..dd135636d 100644 --- a/src/slic3r/GUI/OptionsGroup.hpp +++ b/src/slic3r/GUI/OptionsGroup.hpp @@ -112,7 +112,7 @@ public: } #endif /* __WXGTK__ */ - void append_line(const Line& line, wxStaticText** colored_Label = nullptr); + void append_line(const Line& line, wxStaticText** full_Label = nullptr); Line create_single_option_line(const Option& option) const; void append_single_option_line(const Option& option) { append_line(create_single_option_line(option)); }