Tweaks and improvements for curves editing

#519
This commit is contained in:
Wojtek Figat
2021-08-04 16:35:19 +02:00
parent 41b7897857
commit fc8c8b5c25
7 changed files with 98 additions and 72 deletions

View File

@@ -1276,24 +1276,24 @@ namespace FlaxEditor.GUI.Timeline
case KeyboardKeys.ArrowUp:
{
int index = IndexInParent;
if (index > 0)
while (index != 0)
{
do
{
toSelect = Parent.GetChild(--index) as Track;
} while (index != -1 && toSelect != null && !toSelect.HasParentsExpanded);
toSelect = Parent.GetChild(--index) as Track;
if (toSelect != null && toSelect.HasParentsExpanded)
break;
toSelect = null;
}
break;
}
case KeyboardKeys.ArrowDown:
{
int index = IndexInParent;
if (index < Parent.ChildrenCount - 1)
while (index < Parent.ChildrenCount - 1)
{
do
{
toSelect = Parent.GetChild(++index) as Track;
} while (index != Parent.ChildrenCount && toSelect != null && !toSelect.HasParentsExpanded);
toSelect = Parent.GetChild(++index) as Track;
if (toSelect != null && toSelect.HasParentsExpanded)
break;
toSelect = null;
}
break;
}