Don't calculate minor ticks when there are no major ticks to be between

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15179#note_1480427547
This commit is contained in:
Ian McInerney
2023-08-03 22:27:38 +01:00
parent ff441c488e
commit f463b9d017
+2 -1
View File
@@ -775,7 +775,8 @@ void mpScaleY::getVisibleDataRange( mpWindow& w, double& minV, double& maxV )
void mpScaleY::computeSlaveTicks( mpWindow& w )
{
if( m_masterScale->m_tickValues.size() == 0 )
// No need for slave ticks when there aren't 2 main ticks for them to go between
if( m_masterScale->m_tickValues.size() < 2 )
return;
m_tickValues.clear();