From 76cf251e592311b633f515cfdf61d2460afd08b5 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 12 Sep 2020 11:03:23 +0200 Subject: filter: avoid unnecessary filter recalculations when loading set When loading a stored filter set, we would get numerous constraintChanged signals, which caused filter recalculations. Use the ignoreSignal flag to prevent these. Signed-off-by: Berthold Stoeger --- desktop-widgets/filterwidget2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop-widgets/filterwidget2.cpp b/desktop-widgets/filterwidget2.cpp index e6eede7df..4fe056078 100644 --- a/desktop-widgets/filterwidget2.cpp +++ b/desktop-widgets/filterwidget2.cpp @@ -89,8 +89,10 @@ void FilterWidget2::selectPreset(int i) void FilterWidget2::loadPreset(int index) { + ignoreSignal = true; // When reloading the filter UI, we get numerous constraintChanged signals. Ignore them. FilterData filter = filter_preset_get(index); setFilterData(filter); + ignoreSignal = false; presetModified = false; updateFilter(); } -- cgit v1.2.3-70-g09d2