Skip to content

Commit 58377b4

Browse files
committed
Fixed outstanding known bugs.
trace event type didn't display and syntax error guides sometimes persisted.
1 parent 76cf284 commit 58377b4

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

GunWin/VisualAnalyzer.Designer.cs

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

GunWin/VisualAnalyzer.cs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,8 @@ public partial class VisualAnalyzer : Form
121121

122122
private bool _EnableTrackBarZoom = true;
123123

124+
private bool _Reloading = false;
125+
124126
#region Constructors And Finalizers
125127

126128
/// <summary>
@@ -342,7 +344,9 @@ private void GuideAssemblyChanged(object sender, SyntaxHighlightingGuideReferenc
342344
private void GrammarAssemblyChanged(object sender, GrammarReference e)
343345
{
344346
var grammar = FetchGrammarInternal(e.AssemblyPath, e.GrammarName);
347+
_Reloading = true;
345348
SetGrammar(grammar);
349+
_Reloading = false;
346350
ParseSource();
347351
ColorizeTokens(null);
348352
}
@@ -522,7 +526,8 @@ private void ColorizeTokens(Range range)
522526
return;
523527

524528
var tokensToColor = range == null ? _Tokens : FindTokensInRange(_Tokens, range);
525-
_Highlighter.ColorizeTokens(CodeEditor, _Registry, tokensToColor, GetErrorTokens());
529+
if (tokensToColor != null)
530+
_Highlighter.ColorizeTokens(CodeEditor, _Registry, tokensToColor, GetErrorTokens());
526531
}
527532

528533
private void ConfigureGraphWorker()
@@ -845,7 +850,7 @@ private void ParseMessageListView_Click(object sender, EventArgs e)
845850

846851
private void ParserRulesCombo_SelectedIndexChanged(object sender, EventArgs e)
847852
{
848-
if (CmbRules.Items.Count > 0)
853+
if (CmbRules.Items.Count > 0 && !_Reloading)
849854
{
850855
ParseSource();
851856
ColorizeTokens(null);

0 commit comments

Comments
 (0)