mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
When synchronizing the front end with the back end after Undo / Redo
jump, postpone error messages, so they are displayed after the Undo / Redo jump has been fully performed. Otherwise there would be a message box opening, taking over the message queue, and possibly performing actions as rendering on an inconsistent application state.
This commit is contained in:
parent
bb6cde789d
commit
6adebb9c78
5 changed files with 42 additions and 26 deletions
|
@ -1320,9 +1320,9 @@ bool GLGizmoSlaSupports::has_backend_supports() const
|
|||
return false;
|
||||
}
|
||||
|
||||
void GLGizmoSlaSupports::reslice_SLA_supports() const
|
||||
void GLGizmoSlaSupports::reslice_SLA_supports(bool postpone_error_messages) const
|
||||
{
|
||||
wxGetApp().CallAfter([this]() { wxGetApp().plater()->reslice_SLA_supports(*m_model_object); });
|
||||
wxGetApp().CallAfter([this, postpone_error_messages]() { wxGetApp().plater()->reslice_SLA_supports(*m_model_object, postpone_error_messages); });
|
||||
}
|
||||
|
||||
void GLGizmoSlaSupports::get_data_from_backend()
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
bool is_in_editing_mode() const { return m_editing_mode; }
|
||||
bool is_selection_rectangle_dragging() const { return m_selection_rectangle.is_dragging(); }
|
||||
bool has_backend_supports() const;
|
||||
void reslice_SLA_supports() const;
|
||||
void reslice_SLA_supports(bool postpone_error_messages = false) const;
|
||||
|
||||
private:
|
||||
bool on_init();
|
||||
|
|
|
@ -882,7 +882,7 @@ void GLGizmosManager::update_after_undo_redo(const UndoRedo::Snapshot& snapshot)
|
|||
m_serializing = false;
|
||||
if (m_current == SlaSupports
|
||||
&& snapshot.snapshot_data.flags & UndoRedo::SnapshotData::RECALCULATE_SLA_SUPPORTS)
|
||||
dynamic_cast<GLGizmoSlaSupports*>(m_gizmos[SlaSupports])->reslice_SLA_supports();
|
||||
dynamic_cast<GLGizmoSlaSupports*>(m_gizmos[SlaSupports])->reslice_SLA_supports(true);
|
||||
}
|
||||
|
||||
void GLGizmosManager::reset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue