diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index f0bc8d79a4..25d6b671d2 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1983,10 +1983,12 @@ void PrintConfigDef::init_fff_params() def = this->add("timelapse_no_toolhead", coBool); def->label = L("Timelapse"); - def->tooltip = L("Record timelapse video of printing without showing toolhead. In this mode " - "the toolhead docks near the excess chute at each layer change, and then " - "a snapshot is taken with the chamber camera. When printing finishes a timelapse " - "video is composed of all the snapshots."); + def->tooltip = L("If enabled, a timelapse video will be generated for each print. " + "After each layer is printed, the toolhead will move to the excess chute, " + "and then a snapshot is taken with the chamber camera. " + "All of these snapshots are composed into a timelapse video when printing completes. " + "Since the melt filament may leak from the nozzle during the process of taking a snapshot, " + "prime tower is required for nozzle priming."); def->mode = comSimple; def->set_default_value(new ConfigOptionBool(false)); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 5920bc4a35..95cd3af6ba 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -1371,12 +1371,50 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) } } - if (opt_key == "enable_prime_tower" || opt_key == "single_extruder_multi_material" || opt_key == "extruders_count" ) + if (opt_key == "single_extruder_multi_material" || opt_key == "extruders_count" ) update_wiping_button_visibility(); + if (opt_key == "enable_prime_tower") { + bool timelapse_enabled = m_config->option("timelapse_no_toolhead")->value; + if (!boost::any_cast(value) && timelapse_enabled) { + MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by timeplase. Are you sure you want to disable both of them?"), + _L("Warning"), wxICON_WARNING | wxYES | wxNO); + if (dlg.ShowModal() == wxID_YES) { + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("timelapse_no_toolhead", new ConfigOptionBool(false)); + m_config_manipulation.apply(m_config, &new_conf); + wxGetApp().plater()->update(); + } + else { + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(true)); + m_config_manipulation.apply(m_config, &new_conf); + } + } + update_wiping_button_visibility(); + } + // reload scene to update timelapse wipe tower - if (opt_key == "timelapse_no_toolhead") - wxGetApp().plater()->update(); + if (opt_key == "timelapse_no_toolhead") { + bool wipe_tower_enabled = m_config->option("enable_prime_tower")->value; + if (!wipe_tower_enabled && boost::any_cast(value)) { + MessageDialog dlg(wxGetApp().plater(), _L("Prime tower is required by timelapse. Do you want to enable both of them?"), + _L("Warning"), wxICON_WARNING | wxYES | wxNO); + if (dlg.ShowModal() == wxID_YES) { + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("enable_prime_tower", new ConfigOptionBool(true)); + m_config_manipulation.apply(m_config, &new_conf); + wxGetApp().plater()->update(); + } + else { + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("timelapse_no_toolhead", new ConfigOptionBool(false)); + m_config_manipulation.apply(m_config, &new_conf); + } + } else { + wxGetApp().plater()->update(); + } + } // BBS #if 0