mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Profiles - Avoid unnecessary OnBrokenStateChanged calls
Profiles - Fixed int range/float range deserialization Profiles - Use Random.Shared where applicable
This commit is contained in:
1 parent
5c7497a859
commit
28640f9502
5 files changed
+14
-5
No files matched your search
@@ -61,6 +61,9 @@ public abstract class BreakableModel : CorePropertyChanged, IBreakableModel
|
||||
/// <inheritdoc />
|
||||
public void SetBrokenState(string state, Exception? exception = null)
|
||||
{
|
||||
if (state == BrokenState && BrokenStateException?.StackTrace == exception?.StackTrace)
|
||||
return;
|
||||
|
||||
BrokenState = state ?? throw new ArgumentNullException(nameof(state));
|
||||
BrokenStateException = exception;
|
||||
OnBrokenStateChanged();
|
||||
|
||||
Reference in new issue
Block a user