diff --git a/Project-Aurora/Project-Aurora/Controls/KeySequence.xaml b/Project-Aurora/Project-Aurora/Controls/KeySequence.xaml index dc50f68ef..aa7cf6b29 100644 --- a/Project-Aurora/Project-Aurora/Controls/KeySequence.xaml +++ b/Project-Aurora/Project-Aurora/Controls/KeySequence.xaml @@ -20,14 +20,7 @@ - - + diff --git a/Project-Aurora/Project-Aurora/Settings/Overrides/Logic/Number/Number_Maths.cs b/Project-Aurora/Project-Aurora/Settings/Overrides/Logic/Number/Number_Maths.cs index 161a13612..bda5193c8 100755 --- a/Project-Aurora/Project-Aurora/Settings/Overrides/Logic/Number/Number_Maths.cs +++ b/Project-Aurora/Project-Aurora/Settings/Overrides/Logic/Number/Number_Maths.cs @@ -137,7 +137,7 @@ protected override bool Execute(IGameState gameState) { } /// Creates a copy of this mathematical comparison. - public override Evaluatable Clone() => new BooleanMathsComparison { Operand1 = Operand1.Clone(), Operand2 = Operand2.Clone() }; + public override Evaluatable Clone() => new BooleanMathsComparison { Operand1 = Operand1.Clone(), Operand2 = Operand2.Clone(), Operator = Operator }; } diff --git a/Project-Aurora/Project-Aurora/Settings/ProfileImporter.cs b/Project-Aurora/Project-Aurora/Settings/ProfileImporter.cs index b8be1765c..0c23aa62f 100644 --- a/Project-Aurora/Project-Aurora/Settings/ProfileImporter.cs +++ b/Project-Aurora/Project-Aurora/Settings/ProfileImporter.cs @@ -4,6 +4,7 @@ using Newtonsoft.Json; using System; using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Globalization; using System.IO; using System.Linq; @@ -734,12 +735,16 @@ private static void ImportJson(this Application app, string filepath) // Create a new profile on the current application (so that profiles can be imported from different applications) ApplicationProfile newProf = app.AddNewProfile(inProf.ProfileName); newProf.TriggerKeybind = inProf.TriggerKeybind.Clone(); - newProf.Layers.Clear(); // Copy any valid layers from the read profile to the new one - for (int i = 0; i < inProf.Layers.Count; i++) - if (app.IsAllowedLayer(inProf.Layers[i].Handler.GetType())) - newProf.Layers.Add((Layer)inProf.Layers[i].Clone()); + void ImportLayers(ObservableCollection source, ObservableCollection target) { + target.Clear(); + for (int i = 0; i < source.Count; i++) + if (app.IsAllowedLayer(source[i].Handler.GetType())) + target.Add((Layer)source[i].Clone()); + } + ImportLayers(inProf.Layers, newProf.Layers); + ImportLayers(inProf.OverlayLayers, newProf.OverlayLayers); // Force a save to write the new profile to disk in the appdata dir app.SaveProfiles();