summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Martin <notmart@gmail.com>2017-04-12 09:22:42 (GMT)
committerMarco Martin <notmart@gmail.com>2017-04-12 09:32:34 (GMT)
commitc8d7f0363a568b6a4c5f0d7061a5858028a0526d (patch)
tree801da8dd82d59d8fbcb224c599ddd06f07cdf10e
parentf7cbf298f9bf430533e184ac1ba218154ecced08 (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 de5b04d..2a85c71 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->setModal(true);
dialog->show();