Skip to content

Commit

Permalink
dix: disable FS watcher after closing BlockedModsDialog
Browse files Browse the repository at this point in the history
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
  • Loading branch information
Scrumplex committed Dec 5, 2022
1 parent b29c996 commit 2fd7338
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions launcher/ui/dialogs/BlockedModsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ void BlockedModsDialog::dropEvent(QDropEvent* e)
update();
}

void BlockedModsDialog::done(int r)
{
QDialog::done(r);
disconnect(&m_watcher, &QFileSystemWatcher::directoryChanged, this, &BlockedModsDialog::directoryChanged);
}

void BlockedModsDialog::openAll()
{
for (auto& mod : m_mods) {
Expand Down
4 changes: 4 additions & 0 deletions launcher/ui/dialogs/BlockedModsDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ Q_OBJECT
void dragEnterEvent(QDragEnterEvent *event) override;
void dropEvent(QDropEvent *event) override;

protected
slots:
void done(int r) override;

private:
Ui::BlockedModsDialog *ui;
QList<BlockedMod> &m_mods;
Expand Down

0 comments on commit 2fd7338

Please sign in to comment.