From e918be05dcdabe69081fa7f8b4e46e233ad3e21d Mon Sep 17 00:00:00 2001 From: ronso0 Date: Fri, 22 Oct 2021 12:12:41 +0200 Subject: [PATCH] effects preferences: fix update() --- src/preferences/dialog/dlgprefeffects.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/preferences/dialog/dlgprefeffects.cpp b/src/preferences/dialog/dlgprefeffects.cpp index 6e696a584ad..c684d13ca4e 100644 --- a/src/preferences/dialog/dlgprefeffects.cpp +++ b/src/preferences/dialog/dlgprefeffects.cpp @@ -91,6 +91,11 @@ void DlgPrefEffects::setupChainListView(QListView* pListView) { void DlgPrefEffects::slotUpdate() { clear(); + // Prevent emission of dataChanged() when clearing the effects lists to not + // call effectsTableItemSelected() with a selection that has no model. + visibleEffectsTableView->selectionModel()->reset(); + hiddenEffectsTableView->selectionModel()->reset(); + const QList visibleEffects = m_pVisibleEffectsList->getList(); m_pVisibleEffectsModel->setList(visibleEffects);