@@ -12,7 +12,7 @@ public abstract class BaseHexNode : BaseNode
12
12
public static DateTime CurrentHighlightTime ;
13
13
public static readonly TimeSpan HightlightDuration = TimeSpan . FromSeconds ( 1 ) ;
14
14
15
- private static readonly Dictionary < IntPtr , ValueTypeWrapper < DateTime > > highlight = new Dictionary < IntPtr , ValueTypeWrapper < DateTime > > ( ) ;
15
+ private static readonly Dictionary < IntPtr , ValueTypeWrapper < DateTime > > HighlightTimer = new Dictionary < IntPtr , ValueTypeWrapper < DateTime > > ( ) ;
16
16
17
17
private readonly byte [ ] buffer ;
18
18
@@ -52,8 +52,10 @@ protected int Draw(ViewInfo view, int x, int y, string text, int length)
52
52
{
53
53
var address = view . Address . Add ( Offset ) ;
54
54
55
+ HighlightTimer . RemoveWhere ( kv => kv . Value . Value < CurrentHighlightTime ) ;
56
+
55
57
ValueTypeWrapper < DateTime > until ;
56
- if ( highlight . TryGetValue ( address , out until ) )
58
+ if ( HighlightTimer . TryGetValue ( address , out until ) )
57
59
{
58
60
if ( until . Value >= CurrentHighlightTime )
59
61
{
@@ -64,14 +66,10 @@ protected int Draw(ViewInfo view, int x, int y, string text, int length)
64
66
until . Value = CurrentHighlightTime . Add ( HightlightDuration ) ;
65
67
}
66
68
}
67
- else
68
- {
69
- highlight . Remove ( address ) ;
70
- }
71
69
}
72
70
else if ( view . Memory . HasChanged ( Offset , MemorySize ) )
73
71
{
74
- highlight . Add ( address , CurrentHighlightTime . Add ( HightlightDuration ) ) ;
72
+ HighlightTimer . Add ( address , CurrentHighlightTime . Add ( HightlightDuration ) ) ;
75
73
76
74
color = view . Settings . HighlightColor ;
77
75
}
0 commit comments