mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-22 14:13:57 -06:00
Show a notification when attempting to slice during SLA support points editing
This should also fix #5736 and a similar crash when deleting an object during manual editing (which was introduced between 2.2.0 and 2.3.0)
This commit is contained in:
parent
1904b7b904
commit
3fd36f08e0
4 changed files with 36 additions and 7 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "slic3r/GUI/GUI_ObjectManipulation.hpp"
|
||||
#include "slic3r/GUI/Plater.hpp"
|
||||
#include "slic3r/Utils/UndoRedo.hpp"
|
||||
#include "slic3r/GUI/NotificationManager.hpp"
|
||||
|
||||
#include "slic3r/GUI/Gizmos/GLGizmoMove.hpp"
|
||||
#include "slic3r/GUI/Gizmos/GLGizmoScale.hpp"
|
||||
|
@ -1139,5 +1140,19 @@ bool GLGizmosManager::grabber_contains_mouse() const
|
|||
return (curr != nullptr) ? (curr->get_hover_id() != -1) : false;
|
||||
}
|
||||
|
||||
|
||||
bool GLGizmosManager::is_in_editing_mode(bool error_notification) const
|
||||
{
|
||||
if (m_current != SlaSupports || ! dynamic_cast<GLGizmoSlaSupports*>(get_current())->is_in_editing_mode())
|
||||
return false;
|
||||
|
||||
if (error_notification)
|
||||
wxGetApp().plater()->get_notification_manager()->push_slicing_error_notification(
|
||||
_u8L("You are currently editing SLA support points. Please, apply or discard "
|
||||
"your changes first."));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace GUI
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue