diff options
| author | Elvis Angelaccio <[email protected]> | 2017-01-14 12:52:58 +0100 |
|---|---|---|
| committer | Elvis Angelaccio <[email protected]> | 2017-01-14 12:52:58 +0100 |
| commit | 85121a8115c5a8b6b7c0a01073663d51bd64e6ae (patch) | |
| tree | cfea1cce9e5169794f9a3d50e789b7be58cdf13f | |
| parent | 44b668e9fbaa86046315b292b2233ca998b24d89 (diff) | |
Don't overwrite custom icons for the show_hidden_files action
BUG: 374508
FIXED-IN: 16.12.2
REVIEW: 129789
| -rw-r--r-- | src/views/dolphinviewactionhandler.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/views/dolphinviewactionhandler.cpp b/src/views/dolphinviewactionhandler.cpp index 5c0b49cd2..273bcdd76 100644 --- a/src/views/dolphinviewactionhandler.cpp +++ b/src/views/dolphinviewactionhandler.cpp @@ -482,6 +482,12 @@ void DolphinViewActionHandler::slotHiddenFilesShownChanged(bool shown) QAction* showHiddenFilesAction = m_actionCollection->action(QStringLiteral("show_hidden_files")); showHiddenFilesAction->setChecked(shown); + // #374508: don't overwrite custom icons. + const QString iconName = showHiddenFilesAction->icon().name(); + if (!iconName.isEmpty() && iconName != QLatin1String("visibility") && iconName != QLatin1String("hint")) { + return; + } + showHiddenFilesAction->setIcon(QIcon::fromTheme(shown ? QStringLiteral("visibility") : QStringLiteral("hint"))); } |
