mirror of
https://codeberg.org/Ikatono/TierMaker.git
synced 2025-10-28 20:45:35 -05:00
tested version with most of the final functionality. Still a few known issues, like dragging to a row that extends to multiple lines
This commit is contained in:
@@ -57,12 +57,14 @@ public static class ExtensionHelper
|
||||
}
|
||||
public static string GetUnusedRowId(this SceneTree tree)
|
||||
{
|
||||
var ids = tree.GetNodesInGroup("RowGroup").OfType<row>().Select(r => r.RowId).ToArray();
|
||||
var ids = tree.GetNodesInGroup("RowGroup").OfType<row>().Select(r => r.RowId)
|
||||
.ToList();
|
||||
int i = 1;
|
||||
while (true)
|
||||
{
|
||||
if (!ids.Contains(i.ToString()))
|
||||
return i.ToString();
|
||||
var s = i.ToString();
|
||||
if (!ids.Contains(s))
|
||||
return s;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user