diff options
author | Sandy Armstrong <sandy@xamarin.com> | 2019-10-28 21:59:46 +0300 |
---|---|---|
committer | Sandy Armstrong <sandy@xamarin.com> | 2019-10-28 21:59:46 +0300 |
commit | 339d0852324990938bd2168edbf8ba15dd21b7d7 (patch) | |
tree | b7d3e4f39608290c131074f371a7f54990921a9e | |
parent | 9af1a3da98db6f2bfa8a5f996057029c38d7afb5 (diff) |
[Debugger] Ensure persisted pinned watches display after IDE restart
-rw-r--r-- | main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs index 1789894109..27feca882b 100644 --- a/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs +++ b/main/src/addins/MonoDevelop.Debugger/MonoDevelop.Debugger.VSTextView/PinnedWatches/PinnedWatchAdornmentManager.cs @@ -137,7 +137,7 @@ namespace MonoDevelop.Debugger.VSTextView.PinnedWatches { try { if (!textView.TextViewLines.IntersectsBufferSpan (span)) { - layer.RemoveAdornmentsByTag (watch); + layer.RemoveAdornment (view); return; } @@ -147,8 +147,10 @@ namespace MonoDevelop.Debugger.VSTextView.PinnedWatches Math.Round (charBound.TextTop + charBound.TextHeight / 2 - view.Frame.Height / 2)); view.SetFrameOrigin (origin); - if (view.Superview == null) + if (view.Superview == null || view.VisibleRect () == CGRect.Empty) { + layer.RemoveAdornment (view); layer.AddAdornment (XPlatAdornmentPositioningBehavior.TextRelative, span, watch, view, null); + } } catch (Exception ex) { view.SetFrameOrigin (default); LoggingService.LogInternalError ("https://vsmac.dev/923058", ex); |