fix auto move new comment to back
This commit is contained in:
@@ -810,10 +810,11 @@ namespace FlaxEditor.Surface
|
||||
int lowestCommentOrder = int.MaxValue;
|
||||
for (int i = 0; i < selection.Count; i++)
|
||||
{
|
||||
if (selection[i] is not SurfaceComment || selection[i].IndexInParent >= lowestCommentOrder)
|
||||
continue;
|
||||
hasCommentsSelected = true;
|
||||
lowestCommentOrder = selection[i].IndexInParent;
|
||||
if (selection[i] is ResizableSurfaceNode node && node is SurfaceComment && node.ResizeBorderControl.IndexInParent < lowestCommentOrder)
|
||||
{
|
||||
hasCommentsSelected = true;
|
||||
lowestCommentOrder = node.ResizeBorderControl.IndexInParent;
|
||||
}
|
||||
}
|
||||
|
||||
return _context.CreateComment(ref surfaceArea, string.IsNullOrEmpty(text) ? "Comment" : text, new Color(1.0f, 1.0f, 1.0f, 0.2f), hasCommentsSelected ? lowestCommentOrder : -1);
|
||||
|
||||
Reference in New Issue
Block a user