mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
Rectangle selection -> Min size of rectangle selection set to 1 pixel
This commit is contained in:
parent
fdf1b8af81
commit
dfe2719656
1 changed files with 36 additions and 39 deletions
|
@ -3751,12 +3751,10 @@ void GLCanvas3D::_rectangular_selection_picking_pass() const
|
||||||
if (m_multisample_allowed)
|
if (m_multisample_allowed)
|
||||||
glsafe(::glEnable(GL_MULTISAMPLE));
|
glsafe(::glEnable(GL_MULTISAMPLE));
|
||||||
|
|
||||||
int width = (int)m_rectangle_selection.get_width();
|
int width = std::max((int)m_rectangle_selection.get_width(), 1);
|
||||||
int height = (int)m_rectangle_selection.get_height();
|
int height = std::max((int)m_rectangle_selection.get_height(), 1);
|
||||||
int px_count = width * height;
|
int px_count = width * height;
|
||||||
|
|
||||||
if (px_count > 0)
|
|
||||||
{
|
|
||||||
int left = (int)m_rectangle_selection.get_left();
|
int left = (int)m_rectangle_selection.get_left();
|
||||||
int top = get_canvas_size().get_height() - (int)m_rectangle_selection.get_top();
|
int top = get_canvas_size().get_height() - (int)m_rectangle_selection.get_top();
|
||||||
if ((left >= 0) && (top >= 0))
|
if ((left >= 0) && (top >= 0))
|
||||||
|
@ -3801,7 +3799,6 @@ void GLCanvas3D::_rectangular_selection_picking_pass() const
|
||||||
#endif // USE_PARALLEL
|
#endif // USE_PARALLEL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
m_hover_volume_idxs.assign(idxs.begin(), idxs.end());
|
m_hover_volume_idxs.assign(idxs.begin(), idxs.end());
|
||||||
_update_volumes_hover_state();
|
_update_volumes_hover_state();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue