Merge pull request #55655 from raulsntos/csharp-items-count
Replace deprecated `GetItemCount()` with `ItemsCount`
This commit is contained in:
commit
2f41af7d2d
@ -119,7 +119,7 @@ namespace GodotTools.Build
|
|||||||
|
|
||||||
private void IssueActivated(int idx)
|
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");
|
throw new IndexOutOfRangeException("Item list index out of range");
|
||||||
|
|
||||||
// Get correct issue idx from issue list
|
// Get correct issue idx from issue list
|
||||||
@ -193,7 +193,7 @@ namespace GodotTools.Build
|
|||||||
string itemText = lineBreakIdx == -1 ? text : text.Substring(0, lineBreakIdx);
|
string itemText = lineBreakIdx == -1 ? text : text.Substring(0, lineBreakIdx);
|
||||||
_issuesList.AddItem(itemText, issue.Warning ? warningIcon : errorIcon);
|
_issuesList.AddItem(itemText, issue.Warning ? warningIcon : errorIcon);
|
||||||
|
|
||||||
int index = _issuesList.GetItemCount() - 1;
|
int index = _issuesList.ItemsCount - 1;
|
||||||
_issuesList.SetItemTooltip(index, tooltip);
|
_issuesList.SetItemTooltip(index, tooltip);
|
||||||
_issuesList.SetItemMetadata(index, i);
|
_issuesList.SetItemMetadata(index, i);
|
||||||
}
|
}
|
||||||
@ -207,7 +207,7 @@ namespace GodotTools.Build
|
|||||||
|
|
||||||
_issuesList.Clear();
|
_issuesList.Clear();
|
||||||
|
|
||||||
var issue = new BuildIssue {Message = cause, Warning = false};
|
var issue = new BuildIssue { Message = cause, Warning = false };
|
||||||
|
|
||||||
ErrorCount += 1;
|
ErrorCount += 1;
|
||||||
_issues.Add(issue);
|
_issues.Add(issue);
|
||||||
@ -348,7 +348,7 @@ namespace GodotTools.Build
|
|||||||
label: "Copy Error".TTR(), (int)IssuesContextMenuOption.Copy);
|
label: "Copy Error".TTR(), (int)IssuesContextMenuOption.Copy);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_issuesListContextMenu.GetItemCount() > 0)
|
if (_issuesListContextMenu.ItemsCount > 0)
|
||||||
{
|
{
|
||||||
_issuesListContextMenu.Position = (Vector2i)(_issuesList.RectGlobalPosition + atPosition);
|
_issuesListContextMenu.Position = (Vector2i)(_issuesList.RectGlobalPosition + atPosition);
|
||||||
_issuesListContextMenu.Popup();
|
_issuesListContextMenu.Popup();
|
||||||
|
Loading…
Reference in New Issue
Block a user