mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-17 02:31:49 +08:00
Fix of #5632 (painter gizmos not working correctly with scaled objects)
This was broken since 8bcdbb7.
This commit is contained in:
parent
48c7673cc6
commit
e733565031
@ -45,9 +45,11 @@ void TriangleSelector::select_patch(const Vec3f& hit, int facet_start,
|
||||
m_cursor = Cursor(hit, source, radius, cursor_type, trafo);
|
||||
|
||||
// In case user changed cursor size since last time, update triangle edge limit.
|
||||
if (m_old_cursor_radius != radius) {
|
||||
set_edge_limit(radius / 5.f);
|
||||
m_old_cursor_radius = radius;
|
||||
// It is necessary to compare the internal radius in m_cursor! radius is in
|
||||
// world coords and does not change after scaling.
|
||||
if (m_old_cursor_radius_sqr != m_cursor.radius_sqr) {
|
||||
set_edge_limit(std::sqrt(m_cursor.radius_sqr) / 5.f);
|
||||
m_old_cursor_radius_sqr = m_cursor.radius_sqr;
|
||||
}
|
||||
|
||||
// Now start with the facet the pointer points to and check all adjacent facets.
|
||||
|
@ -146,7 +146,7 @@ protected:
|
||||
};
|
||||
|
||||
Cursor m_cursor;
|
||||
float m_old_cursor_radius;
|
||||
float m_old_cursor_radius_sqr;
|
||||
|
||||
// Private functions:
|
||||
bool select_triangle(int facet_idx, EnforcerBlockerType type,
|
||||
|
Loading…
x
Reference in New Issue
Block a user