Commit cde45bfd authored by Stefan Gerlach's avatar Stefan Gerlach

simplified search for pics

parent a2cc20c9
......@@ -848,9 +848,6 @@ void XYFitCurveDock::updateModelEquation() {
numSuffix = "4";
if ((nsl_fit_model_type_basic)m_fitData.modelType == nsl_fit_model_power && num > 2)
numSuffix = "2";
file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "labplot2/pics/fit_models/"
+ QString(nsl_fit_model_basic_pic_name[m_fitData.modelType]) + numSuffix + ".jpg");
if (!QFileInfo(file).exists())
file = QStandardPaths::locate(QStandardPaths::AppDataLocation, "pics/fit_models/"
+ QString(nsl_fit_model_basic_pic_name[m_fitData.modelType]) + numSuffix + ".jpg");
break;
......@@ -860,24 +857,15 @@ void XYFitCurveDock::updateModelEquation() {
QString numSuffix = QString::number(num);
if (num > 4)
numSuffix = "4";
file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "labplot2/pics/fit_models/"
+ QString(nsl_fit_model_peak_pic_name[m_fitData.modelType]) + numSuffix + ".jpg");
if (!QFileInfo(file).exists())
file = QStandardPaths::locate(QStandardPaths::AppDataLocation, "pics/fit_models/"
+ QString(nsl_fit_model_peak_pic_name[m_fitData.modelType]) + numSuffix + ".jpg");
break;
}
case nsl_fit_model_growth:
file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "labplot2/pics/fit_models/"
+ QString(nsl_fit_model_growth_pic_name[m_fitData.modelType]) + ".jpg");
if (!QFileInfo(file).exists())
file = QStandardPaths::locate(QStandardPaths::AppDataLocation, "pics/fit_models/"
+ QString(nsl_fit_model_growth_pic_name[m_fitData.modelType]) + ".jpg");
break;
case nsl_fit_model_distribution:
file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "labplot2/pics/gsl_distributions/"
+ QString(nsl_sf_stats_distribution_pic_name[m_fitData.modelType]) + ".jpg");
if (!QFileInfo(file).exists())
file = QStandardPaths::locate(QStandardPaths::AppDataLocation, "pics/gsl_distributions/"
+ QString(nsl_sf_stats_distribution_pic_name[m_fitData.modelType]) + ".jpg");
// change label
......
......@@ -334,9 +334,7 @@ void RandomValuesDialog::distributionChanged(int index) {
break;
}
QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "labplot2/pics/gsl_distributions/" + QString(nsl_sf_stats_distribution_pic_name[dist]) + ".jpg");
if (!QFileInfo(file).exists())
file = QStandardPaths::locate(QStandardPaths::AppDataLocation, "pics/gsl_distributions/" + QString(nsl_sf_stats_distribution_pic_name[dist]) + ".jpg");
QString file = QStandardPaths::locate(QStandardPaths::AppDataLocation, "pics/gsl_distributions/" + QString(nsl_sf_stats_distribution_pic_name[dist]) + ".jpg");
ui.lFuncPic->setPixmap(QPixmap(file));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment