From e32501906e57e1e45f4363c06f09c4a45aa44da5 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 21 Aug 2016 22:22:20 +0200 Subject: options/bundle: don't fire signals in reload() with no unsaved changes --- options/bundle.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/options/bundle.cpp b/options/bundle.cpp index cf75097c..644fe4c6 100644 --- a/options/bundle.cpp +++ b/options/bundle.cpp @@ -23,12 +23,16 @@ void bundle::reload() { QMutexLocker l(&mtx); saved = group(group_name); + const bool has_changes = transient != saved; transient = saved; - connector::notify_all_values(); - emit reloading(); + if (has_changes) + { + connector::notify_all_values(); + emit reloading(); + emit changed(); + } } - emit changed(); } void bundle::store_kv(const QString& name, const QVariant& datum) -- cgit v1.2.3