diff options
| author | Nicolas Fella <[email protected]> | 2021-09-22 20:52:52 +0200 |
|---|---|---|
| committer | Nicolas Fella <[email protected]> | 2021-09-22 23:25:23 +0200 |
| commit | 8bf64cf8b15f390ab9a76f304dc22438b258556f (patch) | |
| tree | 8e3b25f1e0bac3a6d52fc50a9275f354266b0dbe /src/dolphinmainwindow.cpp | |
| parent | 0ac967c02197d487ba6b016dc329d493999015cc (diff) | |
Don't force icon for preferred search tool action if one is manually configured
The code reads the icon from the relevant application and uses that for the action
When the user has configured one manually in the toolbar settings that is overridden
To avoid this only change the icon if it is the default one (search)
BUG: 442815
(cherry picked from commit d3f427a6da1b117c85b1080bf198ae4758d00e8e)
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 961607d86..0d8438075 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1013,7 +1013,11 @@ void DolphinMainWindow::updateOpenPreferredSearchToolAction() if (tool) { openPreferredSearchTool->setVisible(true); openPreferredSearchTool->setText(i18nc("@action:inmenu Tools", "Open %1", tool->text())); - openPreferredSearchTool->setIcon(tool->icon()); + // Only override with the app icon if it is the default, i.e. the user hasn't configured one manually + // https://bugs.kde.org/show_bug.cgi?id=442815 + if (openPreferredSearchTool->icon().name() == QLatin1String("search")) { + openPreferredSearchTool->setIcon(tool->icon()); + } } else { openPreferredSearchTool->setVisible(false); // still visible in Shortcuts configuration window |
