Merge remote-tracking branch 'origin/master' into ys_ftn_improvements

This commit is contained in:
YuSanka 2019-04-25 08:12:19 +02:00
commit b39e9a81f3
52 changed files with 2124 additions and 1255 deletions

View file

@ -25,7 +25,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
#endif // __APPLE__
{
m_og->set_name(_(L("Object Manipulation")));
m_og->label_width = 12 * wxGetApp().em_unit();//125;
m_og->label_width = 12;//125;
m_og->set_grid_vgap(5);
m_og->m_on_change = std::bind(&ObjectManipulation::on_change, this, std::placeholders::_1, std::placeholders::_2);
@ -76,12 +76,12 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
def.label = "";
def.gui_type = "legend";
def.tooltip = L("Object name");
def.width = 21 * wxGetApp().em_unit();
def.width = 21;
def.default_value = new ConfigOptionString{ " " };
line.append_option(Option(def, "object_name"));
m_og->append_line(line);
const int field_width = 5 * wxGetApp().em_unit()/*50*/;
const int field_width = 5;
// Legend for object modification
line = Line{ "", "" };
@ -110,7 +110,7 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
// Add "uniform scaling" button in front of "Scale" option
if (option_name == "Scale") {
line.near_label_widget = [this](wxWindow* parent) {
auto btn = new PrusaLockButton(parent, wxID_ANY);
auto btn = new LockButton(parent, wxID_ANY);
btn->Bind(wxEVT_BUTTON, [btn, this](wxCommandEvent &event){
event.Skip();
wxTheApp->CallAfter([btn, this]() { set_uniform_scaling(btn->IsLocked()); });
@ -149,15 +149,13 @@ ObjectManipulation::ObjectManipulation(wxWindow* parent) :
m_og->append_line(add_og_to_object_settings(L("Scale"), "%"), &m_scale_Label);
m_og->append_line(add_og_to_object_settings(L("Size"), "mm"));
/* Unused parameter at this time
def.label = L("Place on bed");
def.type = coBool;
def.tooltip = L("Automatic placing of models on printing bed in Y axis");
def.gui_type = "";
def.sidetext = "";
def.default_value = new ConfigOptionBool{ false };
m_og->append_single_option_line(Option(def, "place_on_bed"));
*/
// call back for a rescale of button "Set uniform scale"
m_og->rescale_near_label_widget = [this](wxWindow* win) {
auto *ctrl = dynamic_cast<LockButton*>(win);
if (ctrl == nullptr)
return;
ctrl->msw_rescale();
};
}
void ObjectManipulation::Show(const bool show)