diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-09-12 11:03:23 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-09-29 16:13:03 -0700 |
commit | 76cf251e592311b633f515cfdf61d2460afd08b5 (patch) | |
tree | 70084da35e81d4881597e7c24de6f5ee7e67fdeb | |
parent | cd27e36b8f99eca4b2870e14644a68d14f5232ba (diff) | |
download | subsurface-76cf251e592311b633f515cfdf61d2460afd08b5.tar.gz |
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 <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | desktop-widgets/filterwidget2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } |