summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <[email protected]>2017-04-12 11:22:42 +0200
committerMarco Martin <[email protected]>2017-04-12 11:26:46 +0200
commitcca27a026af372ac339db12a66779c858b4b6a17 (patch)
tree0cb38cc538aac75b6d4c057c2787a6214de14087
parentf71786ef058beab7676d81282b2d3b0aeeb8084a (diff)
possible to edit the default color scheme
Summary: no reason to not allow editing the default color sheme with an invalid path, everyting falls back to the default, keeping the dialog fully functional Test Plan: edited default color scheme, saved as a new one Reviewers: #plasma, davidedmundson Reviewed By: #plasma, davidedmundson Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D5406
-rw-r--r--kcms/colors/colorscm.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/kcms/colors/colorscm.cpp b/kcms/colors/colorscm.cpp
index 105843c..39c6d93 100644
--- a/kcms/colors/colorscm.cpp
+++ b/kcms/colors/colorscm.cpp
@@ -161,7 +161,6 @@ void KColorCm::loadScheme(QListWidgetItem *currentItem, QListWidgetItem *previou
if (name == i18nc("Default color scheme", "Default"))
{
schemeRemoveButton->setEnabled(false);
- schemeEditButton->setEnabled(false);
KSharedConfigPtr config = m_config;
config->setReadDefaults(true);
@@ -423,10 +422,7 @@ void KColorCm::on_schemeEditButton_clicked()
const QString fileBaseName = currentItem->data(Qt::UserRole).toString();
const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
"color-schemes/" + fileBaseName + ".colors");
- if (path.isEmpty()) {
- KMessageBox::sorry(this, i18n("This scheme was not found."), i18n("File not found"));
- return;
- }
+
SchemeEditorDialog* dialog = new SchemeEditorDialog(path, this);
dialog->setAttribute(Qt::WA_DeleteOnClose); // avoid mem-leak
dialog->setModal(true);