mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 23:46:24 -06:00
Implement Preparation for Edit Custom Gcode
Original Commit: prusa3d/PrusaSlicer@7db83d5 Co-authored-by: YuSanka <yusanka@gmail.com>
This commit is contained in:
parent
4f0a47b7f4
commit
accdbb9661
8 changed files with 117 additions and 25 deletions
|
@ -102,6 +102,14 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
|
|||
};
|
||||
field->m_parent = parent();
|
||||
|
||||
if (edit_custom_gcode && opt.is_code) {
|
||||
field->m_fn_edit_value = [this](std::string opt_id) {
|
||||
if (!m_disabled)
|
||||
this->edit_custom_gcode(opt_id);
|
||||
};
|
||||
field->set_edit_tooltip(_L("Edit CustomG-code"));
|
||||
}
|
||||
|
||||
field->m_back_to_initial_value = [this](std::string opt_id) {
|
||||
if (!m_disabled)
|
||||
this->back_to_initial_value(opt_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue