mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Complited "update" for TabPrint.
!->It's one unresolved problem - dlg->ShowModal() call update(). Added "get_field" at Tab & Page. Extended "change_opt_value" Extended "get_value" to Choise.
This commit is contained in:
parent
129bd898cd
commit
3567981089
6 changed files with 311 additions and 196 deletions
|
@ -219,7 +219,7 @@ void ConfigOptionsGroup::on_change_OG(t_config_option_key opt_id, boost::any val
|
|||
auto option = m_options.at(opt_id);
|
||||
|
||||
// get value
|
||||
auto field_value = get_value(opt_id);
|
||||
//! auto field_value = get_value(opt_id);
|
||||
if (option.gui_flags.compare("serialized")==0) {
|
||||
if (opt_index != -1){
|
||||
// die "Can't set serialized option indexed value" ;
|
||||
|
@ -243,7 +243,7 @@ void ConfigOptionsGroup::on_change_OG(t_config_option_key opt_id, boost::any val
|
|||
}
|
||||
}
|
||||
|
||||
OptionsGroup::on_change_OG(opt_id, value);
|
||||
OptionsGroup::on_change_OG(opt_id, value); //!? Why doing this
|
||||
}
|
||||
|
||||
void ConfigOptionsGroup::reload_config(){
|
||||
|
@ -331,8 +331,7 @@ boost::any ConfigOptionsGroup::get_config_value(DynamicPrintConfig& config, std:
|
|||
break;
|
||||
case coEnum:{
|
||||
if (opt_key.compare("external_fill_pattern") == 0 ||
|
||||
opt_key.compare("fill_pattern") == 0 ||
|
||||
opt_key.compare("external_fill_pattern") == 0 ){
|
||||
opt_key.compare("fill_pattern") == 0 ){
|
||||
ret = static_cast<int>(config.option<ConfigOptionEnum<InfillPattern>>(opt_key)->value);
|
||||
}
|
||||
else if (opt_key.compare("gcode_flavor") == 0 ){
|
||||
|
@ -357,5 +356,16 @@ boost::any ConfigOptionsGroup::get_config_value(DynamicPrintConfig& config, std:
|
|||
return ret;
|
||||
}
|
||||
|
||||
Field* ConfigOptionsGroup::get_fieldc(t_config_option_key opt_key, int opt_index){
|
||||
std::string opt_id = "";
|
||||
for (std::map< std::string, std::pair<std::string, int> >::iterator it = m_opt_map.begin(); it != m_opt_map.end(); ++it) {
|
||||
if (opt_key == m_opt_map.at(it->first).first && opt_index == m_opt_map.at(it->first).second){
|
||||
opt_id = it->first;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return opt_id.empty() ? nullptr : get_field(opt_id);
|
||||
}
|
||||
|
||||
} // GUI
|
||||
} // Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue