ENH: add custom gcode back

Add custom gcode back, which can be inserted in
gcode viewer layer slider.

Signed-off-by: salt.wei <salt.wei@bambulab.com>
Change-Id: I270cc438bedf11b30f07f8f9bad6ae5436d5a2dd
This commit is contained in:
salt.wei 2022-09-26 09:38:11 +08:00 committed by Lane.Wei
parent b0de324ea8
commit b8d9a2fdf3
17 changed files with 185 additions and 65 deletions

View file

@ -2914,6 +2914,15 @@ void TabPrinter::build_fff()
option.opt.height = gcode_field_height;//150;
optgroup->append_single_option_line(option);
optgroup = page->new_optgroup(L("Template Custom G-code"), L"param_gcode", 0);
optgroup->m_on_change = [this, optgroup](const t_config_option_key& opt_key, const boost::any& value) {
validate_custom_gcode_cb(this, optgroup, opt_key, value);
};
option = optgroup->get_option("template_custom_gcode");
option.opt.is_code = true;
option.opt.height = gcode_field_height;//150;
optgroup->append_single_option_line(option);
#if 0
//page = add_options_page(L("Dependencies"), "advanced");
// optgroup = page->new_optgroup(L("Profile dependencies"));