mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Show an error notification when attempting to save 3MF while editing SLA support points
The notification disappears when it is no longer valid.
This commit is contained in:
parent
abd5a9a46e
commit
70573484c2
4 changed files with 13 additions and 5 deletions
|
@ -16,6 +16,7 @@
|
||||||
#include "slic3r/GUI/GUI_ObjectSettings.hpp"
|
#include "slic3r/GUI/GUI_ObjectSettings.hpp"
|
||||||
#include "slic3r/GUI/GUI_ObjectList.hpp"
|
#include "slic3r/GUI/GUI_ObjectList.hpp"
|
||||||
#include "slic3r/GUI/Plater.hpp"
|
#include "slic3r/GUI/Plater.hpp"
|
||||||
|
#include "slic3r/GUI/NotificationManager.hpp"
|
||||||
#include "libslic3r/PresetBundle.hpp"
|
#include "libslic3r/PresetBundle.hpp"
|
||||||
#include "libslic3r/SLAPrint.hpp"
|
#include "libslic3r/SLAPrint.hpp"
|
||||||
|
|
||||||
|
@ -1161,6 +1162,7 @@ void GLGizmoSlaSupports::disable_editing_mode()
|
||||||
m_c->instances_hider()->show_supports(true);
|
m_c->instances_hider()->show_supports(true);
|
||||||
m_parent.set_as_dirty();
|
m_parent.set_as_dirty();
|
||||||
}
|
}
|
||||||
|
wxGetApp().plater()->get_notification_manager()->close_notification_of_type(NotificationType::QuitSLAManualMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1147,9 +1147,11 @@ bool GLGizmosManager::is_in_editing_mode(bool error_notification) const
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (error_notification)
|
if (error_notification)
|
||||||
wxGetApp().plater()->get_notification_manager()->push_slicing_error_notification(
|
wxGetApp().plater()->get_notification_manager()->push_notification(
|
||||||
_u8L("You are currently editing SLA support points. Please, apply or discard "
|
NotificationType::QuitSLAManualMode,
|
||||||
"your changes first."));
|
NotificationManager::NotificationLevel::ErrorNotification,
|
||||||
|
_u8L("You are currently editing SLA support points. Please, "
|
||||||
|
"apply or discard your changes first."));
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,7 +73,9 @@ enum class NotificationType
|
||||||
// Notification that auto adding of color changes is impossible
|
// Notification that auto adding of color changes is impossible
|
||||||
EmptyAutoColorChange,
|
EmptyAutoColorChange,
|
||||||
// Notification emitted by Print::validate
|
// Notification emitted by Print::validate
|
||||||
PrintValidateWarning
|
PrintValidateWarning,
|
||||||
|
// Notification telling user to quit SLA supports manual editing
|
||||||
|
QuitSLAManualMode
|
||||||
};
|
};
|
||||||
|
|
||||||
class NotificationManager
|
class NotificationManager
|
||||||
|
|
|
@ -5418,7 +5418,9 @@ void Plater::export_amf()
|
||||||
|
|
||||||
void Plater::export_3mf(const boost::filesystem::path& output_path)
|
void Plater::export_3mf(const boost::filesystem::path& output_path)
|
||||||
{
|
{
|
||||||
if (p->model.objects.empty()) { return; }
|
if (p->model.objects.empty()
|
||||||
|
|| canvas3D()->get_gizmos_manager().is_in_editing_mode(true))
|
||||||
|
return;
|
||||||
|
|
||||||
wxString path;
|
wxString path;
|
||||||
bool export_config = true;
|
bool export_config = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue