mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 22:47:32 -06:00
ENH: validate the config from 3mf and give some hints when there are errors
Change-Id: Ic25e5426e4e85a35a6a2413109f47b653955ec78
This commit is contained in:
parent
84eebfc729
commit
9dceb42ba3
7 changed files with 174 additions and 76 deletions
|
@ -1565,8 +1565,8 @@ NotificationManager::NotificationManager(wxEvtHandler* evt_handler) :
|
|||
|
||||
void NotificationManager::on_change_color_mode(bool is_dark) {
|
||||
m_is_dark = is_dark;
|
||||
for (std::unique_ptr<PopNotification>& notification : m_pop_notifications){
|
||||
notification->on_change_color_mode(is_dark);
|
||||
for (std::unique_ptr<PopNotification>& notification : m_pop_notifications){
|
||||
notification->on_change_color_mode(is_dark);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2338,7 +2338,6 @@ size_t NotificationManager::get_notification_count() const
|
|||
return ret;
|
||||
}
|
||||
|
||||
|
||||
void NotificationManager::bbl_show_plateinfo_notification(const std::string &text)
|
||||
{
|
||||
NotificationData data{NotificationType::BBLPlateInfo, NotificationLevel::PrintInfoNotificationLevel, BBL_NOTICE_MAX_INTERVAL, text};
|
||||
|
@ -2355,6 +2354,30 @@ void NotificationManager::bbl_show_plateinfo_notification(const std::string &tex
|
|||
push_notification_data(std::move(notification), 0);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_close_3mf_warn_notification()
|
||||
{
|
||||
for (std::unique_ptr<PopNotification> ¬ification : m_pop_notifications)
|
||||
if (notification->get_type() == NotificationType::BBL3MFInfo) {
|
||||
notification->close();
|
||||
}
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_show_3mf_warn_notification(const std::string &text)
|
||||
{
|
||||
NotificationData data{NotificationType::BBL3MFInfo, NotificationLevel::ErrorNotificationLevel, BBL_NOTICE_MAX_INTERVAL, text};
|
||||
|
||||
for (std::unique_ptr<PopNotification> ¬ification : m_pop_notifications) {
|
||||
if (notification->get_type() == NotificationType::BBL3MFInfo) {
|
||||
notification->reinit();
|
||||
notification->update(data);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
auto notification = std::make_unique<NotificationManager::PopNotification>(data, m_id_provider, m_evt_handler);
|
||||
push_notification_data(std::move(notification), 0);
|
||||
}
|
||||
|
||||
void NotificationManager::bbl_close_plateinfo_notification()
|
||||
{
|
||||
for (std::unique_ptr<PopNotification> ¬ification : m_pop_notifications)
|
||||
|
@ -2363,6 +2386,7 @@ void NotificationManager::bbl_close_plateinfo_notification()
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void NotificationManager::bbl_show_preview_only_notification(const std::string &text)
|
||||
{
|
||||
NotificationData data{NotificationType::BBLPreviewOnlyMode, NotificationLevel::WarningNotificationLevel, 0, text};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue