Added a warning whenbed temperatures differ too much
This commit is contained in:
parent
8431595db8
commit
5c3e5f507a
@ -472,6 +472,17 @@ std::string Print::validate(std::vector<std::string>* warnings) const
|
|||||||
{
|
{
|
||||||
std::vector<unsigned int> extruders = this->extruders();
|
std::vector<unsigned int> extruders = this->extruders();
|
||||||
|
|
||||||
|
if (warnings) {
|
||||||
|
for (size_t a=0; a<extruders.size(); ++a)
|
||||||
|
for (size_t b=a+1; b<extruders.size(); ++b)
|
||||||
|
if (std::abs(m_config.bed_temperature.get_at(extruders[a]) - m_config.bed_temperature.get_at(extruders[b])) > 15
|
||||||
|
|| std::abs(m_config.first_layer_bed_temperature.get_at(extruders[a]) - m_config.first_layer_bed_temperature.get_at(extruders[b])) > 15) {
|
||||||
|
warnings->emplace_back("_BED_TEMPS_DIFFER");
|
||||||
|
goto DONE;
|
||||||
|
}
|
||||||
|
DONE:;
|
||||||
|
}
|
||||||
|
|
||||||
if (m_objects.empty())
|
if (m_objects.empty())
|
||||||
return _u8L("All objects are outside of the print volume.");
|
return _u8L("All objects are outside of the print volume.");
|
||||||
|
|
||||||
|
@ -3202,8 +3202,8 @@ void Plater::priv::process_validation_warning(const std::vector<std::string>& wa
|
|||||||
{
|
{
|
||||||
if (warnings.empty())
|
if (warnings.empty())
|
||||||
notification_manager->close_notification_of_type(NotificationType::ValidateWarning);
|
notification_manager->close_notification_of_type(NotificationType::ValidateWarning);
|
||||||
else {
|
|
||||||
std::string text = warnings.front();
|
for (std::string text : warnings) {
|
||||||
std::string hypertext = "";
|
std::string hypertext = "";
|
||||||
std::function<bool(wxEvtHandler*)> action_fn = [](wxEvtHandler*){ return false; };
|
std::function<bool(wxEvtHandler*)> action_fn = [](wxEvtHandler*){ return false; };
|
||||||
|
|
||||||
@ -3222,6 +3222,8 @@ void Plater::priv::process_validation_warning(const std::vector<std::string>& wa
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
if (text == "_BED_TEMPS_DIFFER")
|
||||||
|
text = _u8L("Bed temperatures for the used filaments differ significantly.");
|
||||||
|
|
||||||
notification_manager->push_notification(
|
notification_manager->push_notification(
|
||||||
NotificationType::ValidateWarning,
|
NotificationType::ValidateWarning,
|
||||||
|
Loading…
Reference in New Issue
Block a user