summaryrefslogtreecommitdiff
path: root/src/modlistviewactions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlistviewactions.cpp')
-rw-r--r--src/modlistviewactions.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/modlistviewactions.cpp b/src/modlistviewactions.cpp
index 6b26a1e3..9f289678 100644
--- a/src/modlistviewactions.cpp
+++ b/src/modlistviewactions.cpp
@@ -818,11 +818,13 @@ void ModListViewActions::removeMods(const QModelIndexList& indices) const
QMessageBox::Yes | QMessageBox::No) == QMessageBox::Yes) {
// use mod names instead of indexes because those become invalid during the
// removal
- DownloadManager::startDisableDirWatcher();
- for (QString name : modNames) {
- m_core.modList()->removeRowForce(ModInfo::getIndex(name), QModelIndex());
+ {
+ DirWatcherManager::Guard dirWatcherGuard =
+ m_core.downloadManager()->dirWatcher().scopedGuard();
+ for (QString name : modNames) {
+ m_core.modList()->removeRowForce(ModInfo::getIndex(name), QModelIndex());
+ }
}
- DownloadManager::endDisableDirWatcher();
}
} else if (!indices.isEmpty()) {
m_core.modList()->removeRow(indices[0].data(ModList::IndexRole).toInt(),