ENH: add wiki link for mixuse of pla and petg

and add wiki link for tpu and brittle materials
jira: none

Change-Id: I15202158cc2ff9b710e80e181bcdf9659e93ff75
(cherry picked from commit a967c41edcc2489e2b348637e4cdfcefa22b2914)
This commit is contained in:
zhimin.zeng
2025-02-07 20:58:09 +08:00
committed by Noisyfox
parent 44fe451dc3
commit 7f6d45ecfd
3 changed files with 35 additions and 8 deletions

View File

@@ -10133,10 +10133,27 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
switch (error)
{
case PLATER_WARNING:
if (state)
notification_manager.push_plater_warning_notification(text);
else
notification_manager.close_plater_warning_notification(text);
if (warning == EWarning::MixUsePLAAndPETG) {
if (state) {
notification_manager.push_slicing_customize_error_notification(NotificationType::BBLMixUsePLAAndPETG, NotificationLevel::WarningNotificationLevel, text, _u8L("Click Wiki for help."),
[](wxEvtHandler*) {
std::string language = wxGetApp().app_config->get("language");
wxString region = L"en";
if (language.find("zh") == 0)
region = L"zh";
wxGetApp().open_browser_with_warning_dialog(wxString::Format(L"https://wiki.bambulab.com/%s/filament-acc/filament/h2d-pla-and-petg-mutual-support", region));
return false;
});
}
else
notification_manager.close_slicing_customize_error_notification(NotificationType::BBLMixUsePLAAndPETG, NotificationLevel::WarningNotificationLevel);
}
else {
if (state)
notification_manager.push_plater_warning_notification(text);
else
notification_manager.close_plater_warning_notification(text);
}
break;
case PLATER_ERROR:
if (warning == EWarning::LeftExtruderPrintableError) {
@@ -10191,7 +10208,15 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
}
if (warning == EWarning::FilamentPrintableError) {
if (state)
notification_manager.push_slicing_customize_error_notification(NotificationType::BBLFilamentPrintableError, NotificationLevel::ErrorNotificationLevel, text);
notification_manager.push_slicing_customize_error_notification(NotificationType::BBLFilamentPrintableError, NotificationLevel::ErrorNotificationLevel, text, _u8L("Click Wiki for help."),
[](wxEvtHandler*) {
std::string language = wxGetApp().app_config->get("language");
wxString region = L"en";
if (language.find("zh") == 0)
region = L"zh";
wxGetApp().open_browser_with_warning_dialog(wxString::Format(L"https://wiki.bambulab.com/%s/filament-acc/filament/h2d-filament-config-limit", region));
return false;
});
else
notification_manager.close_slicing_customize_error_notification(NotificationType::BBLFilamentPrintableError, NotificationLevel::ErrorNotificationLevel);
}