Aligned printer settings on Plater tab

This commit is contained in:
YuSanka 2018-04-25 11:10:34 +02:00
parent 7c7c37a4f4
commit cfac6c0ebb
4 changed files with 11 additions and 12 deletions

View file

@ -640,8 +640,8 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
{
DynamicPrintConfig* config = &g_PresetBundle->prints.get_edited_preset().config;
m_optgroup = std::make_shared<ConfigOptionsGroup>(parent, "", config);
const wxArrayInt& ar = preset_sizer->GetColWidths();
m_optgroup->label_width = ar.IsEmpty() ? 100 : ar.front();
// const wxArrayInt& ar = preset_sizer->GetColWidths();
// m_optgroup->label_width = ar.IsEmpty() ? 100 : ar.front(); // doesn't work
m_optgroup->m_on_change = [config](t_config_option_key opt_key, boost::any value){
TabPrint* tab_print = nullptr;
for (size_t i = 0; i < g_wxTabPanel->GetPageCount(); ++i) {
@ -695,10 +695,9 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
tab_print->update_dirty();
};
const int width = 250;
Option option = m_optgroup->get_option("fill_density");
option.opt.sidetext = "";
option.opt.width = width;
option.opt.full_width = true;
m_optgroup->append_single_option_line(option);
ConfigOptionDef def;
@ -717,7 +716,7 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
"Everywhere";
def.default_value = new ConfigOptionStrings { selection };
option = Option(def, "support");
option.opt.width = width;
option.opt.full_width = true;
m_optgroup->append_single_option_line(option);
m_brim_width = config->opt_float("brim_width");
@ -756,7 +755,7 @@ void add_frequently_changed_parameters(wxWindow* parent, wxBoxSizer* sizer, wxFl
sizer->Add(m_optgroup->sizer, 0, wxEXPAND | wxBOTTOM | wxBottom, 1);
sizer->Add(m_optgroup->sizer, 1, wxEXPAND | wxBOTTOM, 2);
}
ConfigOptionsGroup* get_optgroup()