mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-03 14:30:38 +08:00
SPE-2186: Allow to show at the same time both warnings about that bed temperature difference and shrinkage compensation weren't used.
This commit is contained in:
parent
4b8fe98443
commit
61cd0beaa9
@ -136,6 +136,10 @@ enum class NotificationType
|
|||||||
SelectFilamentFromConnect,
|
SelectFilamentFromConnect,
|
||||||
// Debug notification for connect communication
|
// Debug notification for connect communication
|
||||||
PrusaConnectPrinters,
|
PrusaConnectPrinters,
|
||||||
|
// Notification that bed temperatures for the used filaments differ significantly.
|
||||||
|
BedTemperaturesDiffer,
|
||||||
|
// Notification that shrinkage compensations for the used filaments differ.
|
||||||
|
ShrinkageCompensationsDiffer,
|
||||||
};
|
};
|
||||||
|
|
||||||
class NotificationManager
|
class NotificationManager
|
||||||
|
@ -1916,9 +1916,14 @@ 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);
|
||||||
|
|
||||||
for (std::string text : warnings) {
|
// Always close warnings BedTemperaturesDiffer and ShrinkageCompensationsDiffer before next processing.
|
||||||
std::string hypertext = "";
|
notification_manager->close_notification_of_type(NotificationType::BedTemperaturesDiffer);
|
||||||
std::function<bool(wxEvtHandler*)> action_fn = [](wxEvtHandler*){ return false; };
|
notification_manager->close_notification_of_type(NotificationType::ShrinkageCompensationsDiffer);
|
||||||
|
|
||||||
|
for (std::string text : warnings) {
|
||||||
|
std::string hypertext = "";
|
||||||
|
NotificationType notification_type = NotificationType::ValidateWarning;
|
||||||
|
std::function<bool(wxEvtHandler*)> action_fn = [](wxEvtHandler*){ return false; };
|
||||||
|
|
||||||
if (text == "_SUPPORTS_OFF") {
|
if (text == "_SUPPORTS_OFF") {
|
||||||
text = _u8L("An object has custom support enforcers which will not be used "
|
text = _u8L("An object has custom support enforcers which will not be used "
|
||||||
@ -1934,16 +1939,17 @@ void Plater::priv::process_validation_warning(const std::vector<std::string>& wa
|
|||||||
print_tab->on_value_change("support_material_auto", config.opt_bool("support_material_auto"));
|
print_tab->on_value_change("support_material_auto", config.opt_bool("support_material_auto"));
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
} else if (text == "_BED_TEMPS_DIFFER") {
|
||||||
|
text = _u8L("Bed temperatures for the used filaments differ significantly.");
|
||||||
|
notification_type = NotificationType::BedTemperaturesDiffer;
|
||||||
|
} else if (text == "_FILAMENT_SHRINKAGE_DIFFER") {
|
||||||
|
text = _u8L("Filament shrinkage will not be used because filament shrinkage "
|
||||||
|
"for the used filaments differs significantly.");
|
||||||
|
notification_type = NotificationType::ShrinkageCompensationsDiffer;
|
||||||
}
|
}
|
||||||
if (text == "_BED_TEMPS_DIFFER")
|
|
||||||
text = _u8L("Bed temperatures for the used filaments differ significantly.");
|
|
||||||
|
|
||||||
if (text == "_FILAMENT_SHRINKAGE_DIFFER")
|
|
||||||
text = _u8L("Filament shrinkage will not be used because filament shrinkage "
|
|
||||||
"for the used filaments differs significantly.");
|
|
||||||
|
|
||||||
notification_manager->push_notification(
|
notification_manager->push_notification(
|
||||||
NotificationType::ValidateWarning,
|
notification_type,
|
||||||
NotificationManager::NotificationLevel::WarningNotificationLevel,
|
NotificationManager::NotificationLevel::WarningNotificationLevel,
|
||||||
_u8L("WARNING:") + "\n" + text, hypertext, action_fn
|
_u8L("WARNING:") + "\n" + text, hypertext, action_fn
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user