From f8e7888c7c0ff3a2c4e5f90a60ff3daca752b4d1 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 30 Aug 2016 13:57:26 -0400 Subject: Add a special case check to the cursor theme settings - don't allow "default" to be set as the cursor theme (causes a conflict due to how we save the setting as the "default" theme - it can't inherit itself). --- src-qt5/core/libLumina/LuminaThemes.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src-qt5/core') diff --git a/src-qt5/core/libLumina/LuminaThemes.cpp b/src-qt5/core/libLumina/LuminaThemes.cpp index 7fe625a7..b6c18cf0 100644 --- a/src-qt5/core/libLumina/LuminaThemes.cpp +++ b/src-qt5/core/libLumina/LuminaThemes.cpp @@ -180,6 +180,13 @@ bool LTHEME::setCurrentSettings(QString themepath, QString colorpath, QString ic //Change the current Cursor Theme bool LTHEME::setCursorTheme(QString cursorname){ //qDebug() << "Set Cursor Theme:" << cursorname; + if(cursorname=="default"){ + //special case - this will cause a recursive inheritance loop - just remove the file instead + if(QFile::exists(QDir::homePath()+"/.icons/default/index.theme")){ + return QFile::remove(QDir::homePath()+"/.icons/default/index.theme"); + } + return true; //already does not exist + } QStringList info = LUtils::readFile(QDir::homePath()+"/.icons/default/index.theme"); bool insection = false; bool changed = false; -- cgit