diff --git a/src/Dlg/DlgSettingsExportFormat.cpp b/src/Dlg/DlgSettingsExportFormat.cpp index 03e7d466..7c6b76c6 100644 --- a/src/Dlg/DlgSettingsExportFormat.cpp +++ b/src/Dlg/DlgSettingsExportFormat.cpp @@ -1136,6 +1136,12 @@ void DlgSettingsExportFormat::updateIntervalConstraints () m_minIntervalGraph : m_minIntervalScreen); + if (cmdMediator().document().modelCoords().coordScaleYRadius() == COORD_SCALE_LOG) { + // Override scale factor with log scale so Export classes are assured that multiplying by the scale factor will + // cause an increase + functionsMin = qMax (1.00000001, functionsMin); + } + if (m_tabWidget->currentIndex() == TAB_WIDGET_INDEX_FUNCTIONS) { if (m_modelExportAfter->pointsIntervalFunctions() < functionsMin) { diff --git a/src/Export/ExportXThetaValuesMergedFunctions.cpp b/src/Export/ExportXThetaValuesMergedFunctions.cpp index 8ad321ac..12532723 100644 --- a/src/Export/ExportXThetaValuesMergedFunctions.cpp +++ b/src/Export/ExportXThetaValuesMergedFunctions.cpp @@ -191,17 +191,21 @@ ExportValuesXOrY ExportXThetaValuesMergedFunctions::periodicLogGraph (double xTh // Convert the gathered values into a periodic sequence ValuesVectorXOrY values; double xTheta = xThetaFirstSimplestNumber; - while (xTheta > xThetaMin) { - xTheta /= m_modelExport.pointsIntervalFunctions(); // Go backwards until reaching or passing minimum + if (m_modelExport.pointsIntervalFunctions() > 1) { // Safe to iterate + while (xTheta > xThetaMin) { + xTheta /= m_modelExport.pointsIntervalFunctions(); // Go backwards until reaching or passing minimum + } } if (xTheta < xThetaMin) { values [xThetaMin] = true; // We passed minimum so insert point right at xThetaMin } - xTheta *= m_modelExport.pointsIntervalFunctions(); - while (xTheta <= xThetaMax) { - values [xTheta] = true; - xTheta *= m_modelExport.pointsIntervalFunctions(); // Insert point at a simple number + if (m_modelExport.pointsIntervalFunctions() > 1) { // Safe to iterate + xTheta *= m_modelExport.pointsIntervalFunctions(); + while (xTheta <= xThetaMax) { + values [xTheta] = true; + xTheta *= m_modelExport.pointsIntervalFunctions(); // Insert point at a simple number + } } if (xTheta > xThetaMax) {