client: Fix lost unsaved highlights on Import
[quassel.git] / src / qtui / settingspages / corehighlightsettingspage.cpp
index cafe98f..9d2f155 100644 (file)
@@ -738,6 +738,11 @@ void CoreHighlightSettingsPage::importRules()
         return;
     }
 
+    if (hasChanged()) {
+        // Save existing changes first to avoid overwriting them
+        save();
+    }
+
     auto clonedManager = HighlightRuleManager();
     clonedManager.fromVariantMap(Client::highlightRuleManager()->toVariantMap());