mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-24 13:29:24 -07:00
Code cleanup
This commit is contained in:
@@ -1722,16 +1722,7 @@ void GLCanvas3D::select_all()
|
||||
|
||||
void GLCanvas3D::deselect_all()
|
||||
{
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
#if ENABLE_SELECTION_UNDO_REDO
|
||||
m_selection.remove_all();
|
||||
#else
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
m_selection.clear();
|
||||
m_selection.set_mode(Selection::Instance);
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
#endif // ENABLE_SELECTION_UNDO_REDO
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
wxGetApp().obj_manipul()->set_dirty();
|
||||
m_gizmos.reset_all_states();
|
||||
m_gizmos.update_data();
|
||||
@@ -5653,15 +5644,7 @@ void GLCanvas3D::_update_selection_from_hover()
|
||||
if (m_hover_volume_idxs.empty())
|
||||
{
|
||||
if (!ctrl_pressed && (m_rectangle_selection.get_state() == GLSelectionRectangle::Select))
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
#if ENABLE_SELECTION_UNDO_REDO
|
||||
m_selection.remove_all();
|
||||
#else
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
m_selection.clear();
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
#endif // ENABLE_SELECTION_UNDO_REDO
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
return;
|
||||
}
|
||||
@@ -5678,8 +5661,6 @@ void GLCanvas3D::_update_selection_from_hover()
|
||||
}
|
||||
}
|
||||
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
#if ENABLE_SELECTION_UNDO_REDO
|
||||
bool selection_changed = false;
|
||||
if (state == GLSelectionRectangle::Select)
|
||||
{
|
||||
@@ -5696,7 +5677,7 @@ void GLCanvas3D::_update_selection_from_hover()
|
||||
// the selection is going to be modified (Add)
|
||||
if (!contains_all)
|
||||
{
|
||||
wxGetApp().plater()->take_snapshot(_(L("Selection - Add - _update_selection_from_hover()")));
|
||||
wxGetApp().plater()->take_snapshot(_(L("Selection-Add from rectangle")));
|
||||
selection_changed = true;
|
||||
}
|
||||
}
|
||||
@@ -5715,7 +5696,7 @@ void GLCanvas3D::_update_selection_from_hover()
|
||||
// the selection is going to be modified (Remove)
|
||||
if (contains_any)
|
||||
{
|
||||
wxGetApp().plater()->take_snapshot(_(L("Selection - Remove - _update_selection_from_hover()")));
|
||||
wxGetApp().plater()->take_snapshot(_(L("Selection-Remove from rectangle")));
|
||||
selection_changed = true;
|
||||
}
|
||||
}
|
||||
@@ -5724,8 +5705,6 @@ void GLCanvas3D::_update_selection_from_hover()
|
||||
return;
|
||||
|
||||
Plater::SuppressSnapshots suppress(wxGetApp().plater());
|
||||
#endif // ENABLE_SELECTION_UNDO_REDO
|
||||
//@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
if ((state == GLSelectionRectangle::Select) && !ctrl_pressed)
|
||||
m_selection.clear();
|
||||
|
||||
Reference in New Issue
Block a user