mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-21 13:47:59 -06:00
Tech ENABLE_SINKING_CONTOURS -> Sinking contours shown while dragging Move/Rotate/Scale gizmos and show contours for gizmo cut
This commit is contained in:
parent
502906178f
commit
b24488ce51
21 changed files with 200 additions and 123 deletions
|
@ -2964,6 +2964,12 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
return;
|
||||
}
|
||||
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
for (GLVolume* volume : m_volumes.volumes) {
|
||||
volume->force_sinking_contours = false;
|
||||
}
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
|
||||
if (m_gizmos.on_mouse(evt)) {
|
||||
if (wxWindow::FindFocus() != m_canvas)
|
||||
// Grab keyboard focus for input in gizmo dialogs.
|
||||
|
@ -2988,6 +2994,25 @@ void GLCanvas3D::on_mouse(wxMouseEvent& evt)
|
|||
default: { break; }
|
||||
}
|
||||
}
|
||||
#if ENABLE_SINKING_CONTOURS
|
||||
else if (evt.Dragging()) {
|
||||
switch (m_gizmos.get_current_type())
|
||||
{
|
||||
case GLGizmosManager::EType::Move:
|
||||
case GLGizmosManager::EType::Scale:
|
||||
case GLGizmosManager::EType::Rotate:
|
||||
{
|
||||
const Selection::IndicesList& idxs = m_selection.get_volume_idxs();
|
||||
for (unsigned int idx : idxs) {
|
||||
m_volumes.volumes[idx]->force_sinking_contours = true;
|
||||
}
|
||||
m_dirty = true;
|
||||
break;
|
||||
}
|
||||
default: { break; }
|
||||
}
|
||||
}
|
||||
#endif // ENABLE_SINKING_CONTOURS
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue