From 3609ca67dffbe55f4dcac1c89be8c0328345887b Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Mon, 6 Dec 2021 02:17:03 +0100 Subject: Replace deprecated GetItemCount() with ItemsCount Replace the deprecated method `GetItemCount()` with the new property `ItemsCount`. --- .../mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/mono/editor') diff --git a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs index b53347fc4c..0d2f3f32e9 100644 --- a/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs +++ b/modules/mono/editor/GodotTools/GodotTools/Build/BuildOutputView.cs @@ -119,7 +119,7 @@ namespace GodotTools.Build private void IssueActivated(int idx) { - if (idx < 0 || idx >= _issuesList.GetItemCount()) + if (idx < 0 || idx >= _issuesList.ItemsCount) throw new IndexOutOfRangeException("Item list index out of range"); // Get correct issue idx from issue list @@ -193,7 +193,7 @@ namespace GodotTools.Build string itemText = lineBreakIdx == -1 ? text : text.Substring(0, lineBreakIdx); _issuesList.AddItem(itemText, issue.Warning ? warningIcon : errorIcon); - int index = _issuesList.GetItemCount() - 1; + int index = _issuesList.ItemsCount - 1; _issuesList.SetItemTooltip(index, tooltip); _issuesList.SetItemMetadata(index, i); } @@ -207,7 +207,7 @@ namespace GodotTools.Build _issuesList.Clear(); - var issue = new BuildIssue {Message = cause, Warning = false}; + var issue = new BuildIssue { Message = cause, Warning = false }; ErrorCount += 1; _issues.Add(issue); @@ -348,7 +348,7 @@ namespace GodotTools.Build label: "Copy Error".TTR(), (int)IssuesContextMenuOption.Copy); } - if (_issuesListContextMenu.GetItemCount() > 0) + if (_issuesListContextMenu.ItemsCount > 0) { _issuesListContextMenu.Position = (Vector2i)(_issuesList.RectGlobalPosition + atPosition); _issuesListContextMenu.Popup(); -- cgit v1.2.3