Polishing of NotificationManager:

Fixed pairing of PrintObjects with slicing warning notifications.
Removed or commented out dead code.
Added documentation.
This commit is contained in:
Vojtech Bubnik 2020-10-14 16:48:56 +02:00
parent c47d4cdc03
commit 447f4b8303
9 changed files with 89 additions and 68 deletions

View file

@ -640,16 +640,17 @@ void GLCanvas3D::WarningTexture::activate(WarningTexture::Warning warning, bool
error = true;
break;
}
if(state) {
auto &notification_manager = *wxGetApp().plater()->get_notification_manager();
if (state) {
if(error)
wxGetApp().plater()->get_notification_manager()->push_plater_error_notification(text,*(wxGetApp().plater()->get_current_canvas3D()));
notification_manager.push_plater_error_notification(text,*(wxGetApp().plater()->get_current_canvas3D()));
else
wxGetApp().plater()->get_notification_manager()->push_plater_warning_notification(text, *(wxGetApp().plater()->get_current_canvas3D()));
notification_manager.push_plater_warning_notification(text, *(wxGetApp().plater()->get_current_canvas3D()));
} else {
if (error)
wxGetApp().plater()->get_notification_manager()->close_plater_error_notification(text);
notification_manager.close_plater_error_notification(text);
else
wxGetApp().plater()->get_notification_manager()->close_plater_warning_notification(text);
notification_manager.close_plater_warning_notification(text);
}
/*