SadConsoleEditor.Editors.SceneEditor.FixLinkedObjectTitles C# (CSharp) Method

FixLinkedObjectTitles() private method

private FixLinkedObjectTitles ( ) : void
return void
        private void FixLinkedObjectTitles()
        {
            for (int i = 0; i < Objects.Count; i++)
            {
                var linkedEntity = LinkedGameObjects[Objects[i].GameObject];
                IEditor linkedEditor = EditorConsoleManager.OpenEditors.Where(e => e.EditorType == Editors.GameObject && ((GameObjectEditor)e).GameObject == linkedEntity).FirstOrDefault();

                if (linkedEditor != null)
                {
                    var name = string.IsNullOrWhiteSpace(linkedEntity.Name) ? "<no name>" : linkedEntity.Name;
                    // last one
                    if (i == Objects.Count - 1)
                    {
                        linkedEditor.Title = (char)192 + " " + name;
                    }
                    else
                    {
                        linkedEditor.Title = (char)195 + " " + name;

                    }
                }

                EditorConsoleManager.ToolsPane.PanelFiles.DocumentsListbox.IsDirty = true;
            }
        }