diff --git a/MainWindow.axaml b/MainWindow.axaml
index 659eed5..f9efbef 100644
--- a/MainWindow.axaml
+++ b/MainWindow.axaml
@@ -220,14 +220,18 @@
-
-
-
-
+
+
+
+
+
+
+ Speichere Unverarbeitete in neuem Verteiler
+ Lösche ursprüngliche Sets
+
- Speichere Unverarbeitete in neuem Verteiler
diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs
index 6959495..6757d21 100644
--- a/MainWindow.axaml.cs
+++ b/MainWindow.axaml.cs
@@ -391,7 +391,7 @@ public partial class MainWindow : Window
progressWindow.Show(_instance);
var processor = new CombineAddresses(progressWindow);
- var result = await processor.Perform(address_lists, type, comb_type, CbMergeExportUnmerged.IsChecked);
+ var result = await processor.Perform(address_lists, type, comb_type, CbMergeExportUnmerged.IsChecked, CbMergeDeleteOld.IsChecked);
if (result.Item1 != null)
result.Item1.owner_id = owner_id;
diff --git a/Tasks/CombineAddresses.cs b/Tasks/CombineAddresses.cs
index 1a7c861..0ac8aa8 100644
--- a/Tasks/CombineAddresses.cs
+++ b/Tasks/CombineAddresses.cs
@@ -24,13 +24,29 @@ public class CombineAddresses
}
public async Task<(KasAddressList, KasAddressList)> Perform(List address_lists, string type, CombineType comb_type,
+ bool? exportUnused, bool? deleteOld)
+ {
+ var result = await Execute(address_lists,type,comb_type,exportUnused);
+
+ if (deleteOld == true)
+ {
+ foreach (var list in address_lists)
+ {
+ Settings._instance.addressSets.addresses.Remove(list);
+ }
+ }
+
+ return result;
+
+ }
+
+ private async Task<(KasAddressList, KasAddressList)> Execute(List address_lists, string type, CombineType comb_type,
bool? exportUnused)
{
if (type == "difference") return await Difference(address_lists, comb_type, exportUnused);
if (type == "union") return await Union(address_lists, comb_type, exportUnused);
if (type == "intersection") return await Intersection(address_lists, comb_type, exportUnused);
if (type == "symdiff") return await SymmetricDifference(address_lists, comb_type, exportUnused);
-
return (null, null);
}