ENH: add wiki link for mixuse of pla and petg
and add wiki link for tpu and brittle materials jira: none Change-Id: I15202158cc2ff9b710e80e181bcdf9659e93ff75
This commit is contained in:
parent
48368ed472
commit
a967c41edc
|
@ -10226,10 +10226,27 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||||
switch (error)
|
switch (error)
|
||||||
{
|
{
|
||||||
case PLATER_WARNING:
|
case PLATER_WARNING:
|
||||||
if (state)
|
if (warning == EWarning::MixUsePLAAndPETG) {
|
||||||
notification_manager.push_plater_warning_notification(text);
|
if (state) {
|
||||||
else
|
notification_manager.push_slicing_customize_error_notification(NotificationType::BBLMixUsePLAAndPETG, NotificationLevel::WarningNotificationLevel, text, _u8L("Click Wiki for help."),
|
||||||
notification_manager.close_plater_warning_notification(text);
|
[](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;
|
break;
|
||||||
case PLATER_ERROR:
|
case PLATER_ERROR:
|
||||||
if (warning == EWarning::LeftExtruderPrintableError) {
|
if (warning == EWarning::LeftExtruderPrintableError) {
|
||||||
|
@ -10284,7 +10301,15 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||||
}
|
}
|
||||||
if (warning == EWarning::FilamentPrintableError) {
|
if (warning == EWarning::FilamentPrintableError) {
|
||||||
if (state)
|
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
|
else
|
||||||
notification_manager.close_slicing_customize_error_notification(NotificationType::BBLFilamentPrintableError, NotificationLevel::ErrorNotificationLevel);
|
notification_manager.close_slicing_customize_error_notification(NotificationType::BBLFilamentPrintableError, NotificationLevel::ErrorNotificationLevel);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1746,10 +1746,11 @@ void NotificationManager::close_general_error_notification(const std::string& te
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void NotificationManager::push_slicing_customize_error_notification(NotificationType type, NotificationLevel level, const std::string &text)
|
void NotificationManager::push_slicing_customize_error_notification(NotificationType type, NotificationLevel level, const std::string &text, const std::string &hypertext, std::function<bool(wxEvtHandler *)> callback)
|
||||||
{
|
{
|
||||||
set_all_slicing_errors_gray(false);
|
set_all_slicing_errors_gray(false);
|
||||||
push_notification_data({type, level, 0, _u8L("Error:") + "\n" + text}, 0);
|
std::string prefix_msg = level == NotificationLevel::WarningNotificationLevel ? _u8L("Warning:") : _u8L("Error:");
|
||||||
|
push_notification_data({type, level, 0, prefix_msg + "\n" + text, hypertext, callback}, 0);
|
||||||
set_slicing_progress_hidden();
|
set_slicing_progress_hidden();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -152,6 +152,7 @@ enum class NotificationType
|
||||||
BBLFilamentPrintableError,
|
BBLFilamentPrintableError,
|
||||||
BBLSliceLimitError,
|
BBLSliceLimitError,
|
||||||
BBLBedFilamentIncompatible,
|
BBLBedFilamentIncompatible,
|
||||||
|
BBLMixUsePLAAndPETG,
|
||||||
NotificationTypeCount
|
NotificationTypeCount
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -236,7 +237,7 @@ public:
|
||||||
void close_plater_error_notification(const std::string& text);
|
void close_plater_error_notification(const std::string& text);
|
||||||
void close_plater_warning_notification(const std::string& text);
|
void close_plater_warning_notification(const std::string& text);
|
||||||
// GCode exceeds the printing range of the extruder
|
// GCode exceeds the printing range of the extruder
|
||||||
void push_slicing_customize_error_notification(NotificationType type, NotificationLevel level, const std::string &text);
|
void push_slicing_customize_error_notification(NotificationType type, NotificationLevel level, const std::string &text, const std::string &hypertext = "", std::function<bool(wxEvtHandler*)> callback = std::function<bool(wxEvtHandler*)>());
|
||||||
void close_slicing_customize_error_notification(NotificationType type, NotificationLevel level);
|
void close_slicing_customize_error_notification(NotificationType type, NotificationLevel level);
|
||||||
|
|
||||||
// Object warning with ObjectID, closes when object is deleted. ID used is of object not print like in slicing warning.
|
// Object warning with ObjectID, closes when object is deleted. ID used is of object not print like in slicing warning.
|
||||||
|
|
Loading…
Reference in New Issue