mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-15 10:43:15 +02:00
Avoid infinite loop if the grid size is zero or less
This commit is contained in:
parent
29eee9f126
commit
ece58909ba
@ -823,6 +823,8 @@ public:
|
|||||||
inline VECTOR2D GetVisibleGridSize() const
|
inline VECTOR2D GetVisibleGridSize() const
|
||||||
{
|
{
|
||||||
VECTOR2D gridScreenSize( m_gridSize );
|
VECTOR2D gridScreenSize( m_gridSize );
|
||||||
|
gridScreenSize.x = std::max( 100.0, gridScreenSize.x );
|
||||||
|
gridScreenSize.y = std::max( 100.0, gridScreenSize.y );
|
||||||
|
|
||||||
double gridThreshold = computeMinGridSpacing() / m_worldScale;
|
double gridThreshold = computeMinGridSpacing() / m_worldScale;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user