Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/debugger-libs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lerner <malerner@microsoft.com>2022-02-12 00:59:06 +0300
committerMarshall Lerner <malerner@microsoft.com>2022-02-14 20:53:02 +0300
commit380f1ca416ef80cd443af0fabeb1d29cd1c4be31 (patch)
tree25ce45afb8e4f52cef8bf26ef4c71f3e2e69996c
parentb6354263840b07b282e871fab32218fe0378b58f (diff)
Don't call BreakEventEnableStatusChanged and NotifyStatusChanged if the break event's enabled doesn't change value
-rw-r--r--Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs3
-rw-r--r--Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs10
2 files changed, 8 insertions, 5 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs b/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs
index 8ebf079..0496cc1 100644
--- a/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs
+++ b/Mono.Debugging/Mono.Debugging.Client/BreakEvent.cs
@@ -137,9 +137,10 @@ namespace Mono.Debugging.Client
set {
if (store != null && store.IsReadOnly)
return;
+ bool previous = enabled;
enabled = value;
if (store != null)
- store.EnableBreakEvent (this, value);
+ store.EnableBreakEvent (this, previous, value);
}
}
diff --git a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
index faae1dc..162b6a4 100644
--- a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
+++ b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs
@@ -506,14 +506,16 @@ namespace Mono.Debugging.Client
return PathComparer.Compare (file1, file2) == 0;
}
- internal bool EnableBreakEvent (BreakEvent be, bool enabled)
+ internal bool EnableBreakEvent (BreakEvent be, bool previouslyEnabled, bool enabled)
{
if (IsReadOnly)
return false;
- OnChanged ();
- BreakEventEnableStatusChanged?.Invoke (this, new BreakEventArgs (be));
- NotifyStatusChanged (be);
+ if (previouslyEnabled != enabled) {
+ OnChanged ();
+ BreakEventEnableStatusChanged?.Invoke (this, new BreakEventArgs (be));
+ NotifyStatusChanged (be);
+ }
return true;
}