ENH: jump to filament map dialog in error tip
1. Remove error tip for unprintable areas if no longer needed 2. Add link for filament map dialog in error tip jira:STUDIO-10073 Signed-off-by: xun.zhang <xun.zhang@bambulab.com> Change-Id: Ic3235038de73a85964c6dbcb9b4f435e7aa47d34 (cherry picked from commit 1793060e96cec973d9606bd4fbe36686671e0fee)
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <wx/glcanvas.h>
|
||||
|
||||
#include "GUI_App.hpp"
|
||||
#include "FilamentMapDialog.hpp"
|
||||
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
@@ -3092,6 +3093,46 @@ void NotificationManager::bbl_close_bed_filament_incompatible_notification()
|
||||
close_notification_of_type(NotificationType::BBLBedFilamentIncompatible);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_show_filament_map_invalid_notification_before_slice(const NotificationType type,const std::string& text)
|
||||
{
|
||||
auto callback = [](wxEvtHandler*) {
|
||||
auto plater = wxGetApp().plater();
|
||||
auto partplate = plater->get_partplate_list().get_curr_plate();
|
||||
try_pop_up_before_slice(false, plater, partplate); // ignore the return value
|
||||
return false;
|
||||
};
|
||||
|
||||
push_notification_data({ type,NotificationLevel::ErrorNotificationLevel,0,_u8L("Error:") + "\n" + text,_u8L("Click here to regroup"),callback }, 0);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_close_filament_map_invalid_notification_before_slice(const NotificationType type)
|
||||
{
|
||||
close_notification_of_type(type);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_show_filament_map_invalid_notification_after_slice(const NotificationType type, const std::string& text)
|
||||
{
|
||||
auto callback = [](wxEvtHandler*) {
|
||||
auto plater = wxGetApp().plater();
|
||||
wxCommandEvent evt(EVT_OPEN_FILAMENT_MAP_SETTINGS_DIALOG);
|
||||
evt.SetEventObject(plater);
|
||||
auto canvas_type = plater->canvas3D()->get_canvas_type();
|
||||
if (canvas_type == GLCanvas3D::ECanvasType::CanvasPreview)
|
||||
evt.SetInt(1); // 1 means from gcode viewer, should do slice right now
|
||||
else
|
||||
evt.SetInt(0);
|
||||
wxPostEvent(plater, evt);
|
||||
return false;
|
||||
};
|
||||
|
||||
push_notification_data({ type,NotificationLevel::ErrorNotificationLevel,0,_u8L("Error:") + "\n" + text,_u8L("Click here to regroup"),callback }, 0);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_close_filament_map_invalid_notification_after_slice(const NotificationType type)
|
||||
{
|
||||
close_notification_of_type(type);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_show_sole_text_notification(NotificationType sType, const std::string &text, bool bOverride, int level, bool autohide) {
|
||||
|
||||
NotificationLevel nlevel;
|
||||
|
||||
Reference in New Issue
Block a user