mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-23 19:02:10 +00:00
ENH: [STUDIO-2773] block notification
Change-Id: I97b556b5ad1f25d8c4118e1f271c0756084d83cc
This commit is contained in:
@@ -8905,8 +8905,9 @@ std::vector<std::array<float, 4>> GLCanvas3D::_parse_colors(const std::vector<st
|
||||
void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||
{
|
||||
enum ErrorType{
|
||||
PLATER_WARNING,
|
||||
PLATER_ERROR,
|
||||
PLATER_WARNING,
|
||||
PLATER_ERROR,
|
||||
SLICING_SERIOUS_WARNING,
|
||||
SLICING_ERROR
|
||||
};
|
||||
std::string text;
|
||||
@@ -8916,7 +8917,7 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||
case EWarning::GCodeConflict: {
|
||||
static std::string prevConflictText;
|
||||
text = prevConflictText;
|
||||
error = ErrorType::SLICING_ERROR;
|
||||
error = ErrorType::SLICING_SERIOUS_WARNING;
|
||||
if (!m_gcode_viewer.m_conflict_result) { break; }
|
||||
std::string objName1 = m_gcode_viewer.m_conflict_result.value()._objName1;
|
||||
std::string objName2 = m_gcode_viewer.m_conflict_result.value()._objName2;
|
||||
@@ -8960,6 +8961,12 @@ void GLCanvas3D::_set_warning_notification(EWarning warning, bool state)
|
||||
else
|
||||
notification_manager.close_plater_error_notification(text);
|
||||
break;
|
||||
case SLICING_SERIOUS_WARNING:
|
||||
if (state)
|
||||
notification_manager.push_slicing_serious_warning_notification(text, {conflictObj});
|
||||
else
|
||||
notification_manager.close_slicing_serious_warning_notification(text);
|
||||
break;
|
||||
case SLICING_ERROR:
|
||||
if (state)
|
||||
notification_manager.push_slicing_error_notification(text, {conflictObj});
|
||||
|
||||
Reference in New Issue
Block a user