mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-20 08:10:52 +01:00
Minor improvement for function QETApp::customElementsDir() and QETApp::commonElementsDir()
the path is set the first time the function is called. Each other call will immediately return the previously setted path instead of check again what path to return.
This commit is contained in:
@@ -197,7 +197,7 @@ void GeneralConfigurationPage::applyConf()
|
||||
settings.setValue("elements-collections/common-collection-path", "default");
|
||||
}
|
||||
if (path != settings.value("elements-collections/common-collection-path").toString()) {
|
||||
QETApp::resetUserElementsDir();
|
||||
QETApp::resetCollectionsPath();
|
||||
}
|
||||
|
||||
path = settings.value("elements-collections/custom-collection-path").toString();
|
||||
@@ -212,7 +212,7 @@ void GeneralConfigurationPage::applyConf()
|
||||
settings.setValue("elements-collections/custom-collection-path", "default");
|
||||
}
|
||||
if (path != settings.value("elements-collections/custom-collection-path").toString()) {
|
||||
QETApp::resetUserElementsDir();
|
||||
QETApp::resetCollectionsPath();
|
||||
}
|
||||
|
||||
path = settings.value("elements-collections/custom-tbt-path").toString();
|
||||
@@ -227,7 +227,7 @@ void GeneralConfigurationPage::applyConf()
|
||||
settings.setValue("elements-collections/custom-tbt-path", "default");
|
||||
}
|
||||
if (path != settings.value("elements-collections/custom-tbt-path").toString()) {
|
||||
QETApp::resetUserElementsDir();
|
||||
QETApp::resetCollectionsPath();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user