Commit 7e912e40 authored by Efe Çiftci's avatar Efe Çiftci Committed by Martin Tobias Holmedahl Sandsmark
Browse files

The previous commit allowed adding the same folder more than once to the "Do...

The previous commit allowed adding the same folder more than once to the "Do not scan" list. It could happen when selecting "Do Not Scan This Folder" option multiple times without rescanning the folder. This commit prevents this bug.
parent 05fc6eac
...@@ -345,14 +345,16 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e) ...@@ -345,14 +345,16 @@ void RadialMap::Widget::mousePressEvent(QMouseEvent *e)
, KRun::RunFlags() , KRun::RunFlags()
#endif #endif
); );
} else if (doNotScanItem && clicked == doNotScanItem) {
Config::skipList.append(Widget::url(m_focus->file()).toLocalFile());
Config::write();
} else if (openTerminal && clicked == openTerminal) { } else if (openTerminal && clicked == openTerminal) {
KToolInvocation::invokeTerminal(QString(),url.path()); KToolInvocation::invokeTerminal(QString(),url.path());
} else if (centerMap && clicked == centerMap) { } else if (centerMap && clicked == centerMap) {
Q_EMIT activated(url); //activate first, this will cause UI to prepare itself Q_EMIT activated(url); //activate first, this will cause UI to prepare itself
createFromCache((Folder *)m_focus->file()); createFromCache((Folder *)m_focus->file());
} else if (doNotScanItem && clicked == doNotScanItem) {
if (!Config::skipList.contains(Widget::url(m_focus->file()).toLocalFile())) {
Config::skipList.append(Widget::url(m_focus->file()).toLocalFile());
Config::write();
}
} else if (openFile && clicked == openFile) { } else if (openFile && clicked == openFile) {
new KRun(url, this, true); new KRun(url, this, true);
} else if (clicked == copyClipboard) { } else if (clicked == copyClipboard) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment