Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuSanka <yusanka@gmail.com>2018-08-03 17:20:39 +0300
committerYuSanka <yusanka@gmail.com>2018-08-03 17:21:05 +0300
commitd4c69a6258ce181ceb526da22bb41e1635d964f6 (patch)
tree1ab37db84e6e6ae526512c63d4c9f176f12ad874 /xs/src/slic3r/GUI/Tab.cpp
parent38b06bb22eb1c1f10cd7c0250411b366def122c1 (diff)
Tabs are completed
Diffstat (limited to 'xs/src/slic3r/GUI/Tab.cpp')
-rw-r--r--xs/src/slic3r/GUI/Tab.cpp63
1 files changed, 26 insertions, 37 deletions
diff --git a/xs/src/slic3r/GUI/Tab.cpp b/xs/src/slic3r/GUI/Tab.cpp
index 6f21829f1..a6d24fd75 100644
--- a/xs/src/slic3r/GUI/Tab.cpp
+++ b/xs/src/slic3r/GUI/Tab.cpp
@@ -679,37 +679,6 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value)
update();
}
-
-void Tab::add_xyz_options_with_legend(ConfigOptionsGroupShp& optgroup, std::vector<std::string>& options)
-{
- // Legend for OptionsGroups
- optgroup->set_show_modified_btns_val(false);
- optgroup->label_width = 230;
- auto line = Line{ "", "" };
-
- ConfigOptionDef def;
- def.type = coString;
- def.width = 150;
- def.gui_type = "legend";
-
- std::vector<std::string> axes{ "X", "Y", "Z" };
- for (auto& axis : axes) {
- def.tooltip = L("Values in this column are for ") + axis + L(" axis");
- def.default_value = new ConfigOptionString{ axis };
- std::string opt_key = axis + "_power_legend";
- auto option = Option(def, opt_key);
- line.append_option(option);
- }
- optgroup->append_line(line);
-
- for (auto& opt_key : options){
- line = Line{ m_config->def()->get(opt_key)->full_label, "" };
- for (int id = 0; id < 3; ++id)
- line.append_option(optgroup->get_option(opt_key, id));
- optgroup->append_line(line);
- }
-}
-
// Show/hide the 'purging volumes' button
void Tab::update_wiping_button_visibility() {
bool wipe_tower_enabled = dynamic_cast<ConfigOptionBool*>( (m_preset_bundle->prints.get_edited_preset().config ).option("wipe_tower"))->value;
@@ -1720,13 +1689,13 @@ void TabPrinter::build()
if (!m_no_controller)
update_serial_ports();
-// build_sla();
+ build_sla();
}
void TabPrinter::build_sla()
{
- m_presets = &m_preset_bundle->printers;
- load_initial_data();
+// m_presets = &m_preset_bundle->printers;
+// load_initial_data();
m_current_pages = &m_sla_pages;
@@ -1767,8 +1736,16 @@ void TabPrinter::build_sla()
optgroup->append_line(line);
optgroup = page->new_optgroup(_(L("Corrections")));
- std::vector<std::string> corrections = { "printer_correction" };
- add_xyz_options_with_legend(optgroup, corrections);
+ line = Line{ m_config->def()->get("printer_correction")->full_label, "" };
+ std::vector<std::string> axes{ "X", "Y", "Z" };
+ int id = 0;
+ for (auto& axis : axes) {
+ auto opt = optgroup->get_option("printer_correction", id);
+ opt.opt.label = axis;
+ line.append_option(opt);
+ ++id;
+ }
+ optgroup->append_line(line);
page = add_options_page(_(L("Notes")), "note.png");
optgroup = page->new_optgroup(_(L("Notes")), 0);
@@ -2878,7 +2855,19 @@ void TabSLAMaterial::build()
optgroup = page->new_optgroup(_(L("Corrections")));
std::vector<std::string> corrections = { "material_correction_printing", "material_correction_curing" };
- add_xyz_options_with_legend(optgroup, corrections);
+ std::vector<std::string> axes{ "X", "Y", "Z" };
+ for (auto& opt_key : corrections){
+ auto line = Line{ m_config->def()->get(opt_key)->full_label, "" };
+ int id = 0;
+ for (auto& axis : axes) {
+ auto opt = optgroup->get_option(opt_key, id);
+ opt.opt.label = axis;
+ opt.opt.width = 60;
+ line.append_option(opt);
+ ++id;
+ }
+ optgroup->append_line(line);
+ }
page = add_options_page(_(L("Notes")), "note.png");
optgroup = page->new_optgroup(_(L("Notes")), 0);