Fix for endless loop dialog - see https://github.com/prusa3d/PrusaSlicer/issues/7419#issuecomment-986325432
When part's configuration is updated => Don't call config_manipulation.update_print_fff_config() separately for applied object's config and then applied own config. Configuration have to be applied from object config and its config. And than call config_manipulation.update_print_fff_config(). + Redundant call of the update_config_values() is deleted from DeleteButton event. All checks are made during update_settings_list().
This commit is contained in:
parent
89eabec582
commit
1ff7214532
@ -110,12 +110,6 @@ bool ObjectSettings::update_settings_list()
|
||||
update_settings_list();
|
||||
m_parent->Layout();
|
||||
});
|
||||
|
||||
/* Check overriden options list after deleting.
|
||||
* Some options couldn't be deleted because of another one.
|
||||
* Like, we couldn't delete fill pattern, if fill density is set to 100%
|
||||
*/
|
||||
update_config_values(config);
|
||||
});
|
||||
return btn;
|
||||
};
|
||||
@ -227,11 +221,12 @@ void ObjectSettings::update_config_values(ModelConfig* config)
|
||||
update_config_values(config);
|
||||
|
||||
if (is_added) {
|
||||
wxTheApp->CallAfter([this]() {
|
||||
// #ysFIXME - Delete after testing! Very likely this CallAfret is no needed
|
||||
// wxTheApp->CallAfter([this]() {
|
||||
wxWindowUpdateLocker noUpdates(m_parent);
|
||||
update_settings_list();
|
||||
m_parent->Layout();
|
||||
});
|
||||
// });
|
||||
}
|
||||
};
|
||||
|
||||
@ -253,9 +248,9 @@ void ObjectSettings::update_config_values(ModelConfig* config)
|
||||
{
|
||||
const int obj_idx = objects_model->GetObjectIdByItem(item);
|
||||
assert(obj_idx >= 0);
|
||||
// for object's part first of all update konfiguration from object
|
||||
main_config.apply(wxGetApp().model().objects[obj_idx]->config.get(), true);
|
||||
printer_technology == ptFFF ? config_manipulation.update_print_fff_config(&main_config) :
|
||||
config_manipulation.update_print_sla_config(&main_config) ;
|
||||
// and then from its own config
|
||||
}
|
||||
|
||||
main_config.apply(config->get(), true);
|
||||
|
Loading…
Reference in New Issue
Block a user