Minor fix previous commits

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5609 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-11-25 10:47:36 +00:00
parent f038b4b545
commit a78212e8dd
2 changed files with 6 additions and 5 deletions

View File

@@ -564,7 +564,7 @@ QString QETApp::customTitleBlockTemplatesDir() {
if (m_user_custom_tbt_dir.isEmpty()) if (m_user_custom_tbt_dir.isEmpty())
{ {
QSettings settings; QSettings settings;
QString path = settings.value("elements-collections/custom-tbt-collection-path", "default").toString(); QString path = settings.value("elements-collections/custom-tbt-path", "default").toString();
if (path != "default" && !path.isEmpty()) if (path != "default" && !path.isEmpty())
{ {
QDir dir(path); QDir dir(path);

View File

@@ -167,18 +167,19 @@ void GeneralConfigurationPage::applyConf()
if (path != settings.value("elements-collections/custom-collection-path").toString()) { if (path != settings.value("elements-collections/custom-collection-path").toString()) {
QETApp::resetUserElementsDir(); QETApp::resetUserElementsDir();
} }
path = settings.value("elements-collections/custom-tbt-collection-path").toString();
path = settings.value("elements-collections/custom-tbt-path").toString();
if (ui->m_custom_tbt_path_cb->currentIndex() == 1) if (ui->m_custom_tbt_path_cb->currentIndex() == 1)
{ {
QString path = ui->m_custom_tbt_path_cb->currentText(); QString path = ui->m_custom_tbt_path_cb->currentText();
QDir dir(path); QDir dir(path);
settings.setValue("elements-collections/custom-tbt-collection-path", settings.setValue("elements-collections/custom-tbt-path",
dir.exists() ? path : "default"); dir.exists() ? path : "default");
} }
else { else {
settings.setValue("elements-collections/custom-tbt-collection-path", "default"); settings.setValue("elements-collections/custom-tbt-path", "default");
} }
if (path != settings.value("elements-collections/custom-tbt-collection-path").toString()) { if (path != settings.value("elements-collections/custom-tbt-path").toString()) {
QETApp::resetUserElementsDir(); QETApp::resetUserElementsDir();
} }
} }