Merge branch 'dev' of https://github.com/prusa3d/PrusaSlicer into et_reload_from_disk

This commit is contained in:
Enrico Turri 2019-09-19 08:33:59 +02:00
commit a37ad3b552
2 changed files with 11 additions and 1 deletions

View file

@ -522,7 +522,11 @@ FreqChangedParams::FreqChangedParams(wxWindow* parent) :
const std::vector<double> &init_extruders = (project_config.option<ConfigOptionFloats>("wiping_volumes_extruders"))->values;
const DynamicPrintConfig* config = &wxGetApp().preset_bundle->printers.get_edited_preset().config;
const std::vector<std::string> &extruder_colours = (config->option<ConfigOptionStrings>("extruder_colour"))->values;
std::vector<std::string> extruder_colours = (config->option<ConfigOptionStrings>("extruder_colour"))->values;
const std::vector<std::string>& filament_colours = (wxGetApp().plater()->get_plater_config()->option<ConfigOptionStrings>("filament_colour"))->values;
for (size_t i=0; i<extruder_colours.size(); ++i)
if (extruder_colours[i] == "" && i < filament_colours.size())
extruder_colours[i] = filament_colours[i];
WipingDialog dlg(parent, cast<float>(init_matrix), cast<float>(init_extruders), extruder_colours);
@ -4838,6 +4842,11 @@ void Plater::on_activate()
this->p->show_delayed_error_message();
}
const DynamicPrintConfig* Plater::get_plater_config() const
{
return p->config;
}
wxString Plater::get_project_filename(const wxString& extension) const
{
return p->get_project_filename(extension);

View file

@ -213,6 +213,7 @@ public:
void on_config_change(const DynamicPrintConfig &config);
// On activating the parent window.
void on_activate();
const DynamicPrintConfig* get_plater_config() const;
void update_object_menu();