Skip to content

Commit e0903f3

Browse files
committed
Better check
1 parent 7cc7b99 commit e0903f3

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

External/Plugins/FlashDebugger/Controls/StackframeUI.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ public void AddFrames(Frame[] frames)
267267
{
268268
foreach (string cp in project.AbsoluteClasspaths)
269269
{
270-
string pathBackSlash = cp.TrimEnd(new[]{Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar});
270+
string pathBackSlash = cp.TrimEnd(new[] { Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar });
271271
pathBackSlash = pathBackSlash.IndexOf(Path.AltDirectorySeparatorChar.ToString()) > -1 ?
272272
pathBackSlash + Path.AltDirectorySeparatorChar : pathBackSlash + Path.DirectorySeparatorChar;
273273
if (sourceFile.getFullPath().ToString().StartsWith(pathBackSlash))
@@ -278,20 +278,23 @@ public void AddFrames(Frame[] frames)
278278
}
279279
}
280280
}
281-
var listItem = new ListViewItem(new[] {string.Empty, title}, -1)
281+
var listItem = new ListViewItem(new[] { string.Empty, title }, -1)
282282
{
283-
Tag = new ListItemData {Frame = item, Index = i++}
283+
Tag = new ListItemData { Frame = item, Index = i++ }
284284
};
285285
listItem.UseItemStyleForSubItems = false;
286286
// TODO: Apply proper theming colour
287287
if (!ownFile) listItem.SubItems[1].ForeColor = System.Drawing.SystemColors.GrayText;
288288
wholeFrameStack.Add(listItem);
289289
}
290290
FilterResults();
291+
toolStripTextBoxFilter.Enabled = lv.Enabled = true;
291292
}
292293
else
294+
{
293295
lv.Items.Clear();
294-
toolStripTextBoxFilter.Enabled = lv.Enabled = lv.Items.Count > 0;
296+
toolStripTextBoxFilter.Enabled = lv.Enabled = false;
297+
}
295298
}
296299

297300
private void Lv_KeyDown(object sender, KeyEventArgs e)

0 commit comments

Comments
 (0)