Position(Displacement)/Rotation/Scale for group selection
This commit is contained in:
parent
7041e2b877
commit
9d7b4ce41d
4 changed files with 14 additions and 4 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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)); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue