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:23:39 +01:00
parent ff441c488e
commit f463b9d017
1 changed files with 2 additions and 1 deletions

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();