From 0ceb38eb66f89cfc1fa7da8ee83050c3b655228d Mon Sep 17 00:00:00 2001 From: joshua Date: Tue, 17 Sep 2019 20:52:47 +0200 Subject: [PATCH] Fix : element prefix don't work with custom path of user elements collection See post at https://qelectrotech.org/forum/viewtopic.php?pid=10593#p10593 --- sources/qetapp.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/sources/qetapp.cpp b/sources/qetapp.cpp index f28f1f060..690b66eee 100644 --- a/sources/qetapp.cpp +++ b/sources/qetapp.cpp @@ -550,7 +550,7 @@ QString QETApp::commonElementsDir() /** * @brief QETApp::customElementsDir - * @return the dir path of user elements collection + * @return the dir path of user elements collection ened by a "/" separator */ QString QETApp::customElementsDir() { @@ -564,6 +564,9 @@ QString QETApp::customElementsDir() if (dir.exists()) { m_user_custom_elements_dir = path; + if(!m_user_custom_elements_dir.endsWith("/")) { + m_user_custom_elements_dir.append("/"); + } return m_user_custom_elements_dir; } } @@ -1232,13 +1235,13 @@ if defined(Q_OS_WIN) void QETApp::useSystemPalette(bool use) { if (use) { qApp->setPalette(initial_palette_); - qApp->setStyleSheet( - "QTabBar::tab:!selected { background-color: transparent; }" - "QTabBar::tab:selected { background-color: transparent; font: bold; color: black;}" - "QAbstractScrollArea#mdiarea {" - "background-color -> setPalette(initial_palette_);" - "}" - ); + qApp->setStyleSheet( + "QTabBar::tab:!selected { background-color: transparent; }" + "QTabBar::tab:selected { background-color: transparent; font: bold; color: black;}" + "QAbstractScrollArea#mdiarea {" + "background-color -> setPalette(initial_palette_);" + "}" + ); } else { QFile file(configDir() + "style.css"); file.open(QFile::ReadOnly);