module-navigation-tool/Editor/History/Utilities/EditorHistoryUtility.cs
Anders Ejlersen 5a2dcf3619 1.8.4: History received a fix for startup issue, increased entry size, and context menu options
- Set selection active in history is now a toggleable feature in the context menu
- Increased number of entries in history from 32 to 64
- Clear entries moved to context menu in history
- Fixed issue, where history didn't work on first startup
2023-03-27 22:02:44 +02:00

37 lines
923 B
C#

using System.Collections.Generic;
namespace Module.NavigationTool.Editor.History
{
internal static class EditorHistoryUtility
{
private static EditorHistoryList EDITOR_HISTORY_LIST;
static EditorHistoryUtility()
{
EDITOR_HISTORY_LIST = null;
}
public static EditorHistoryList GetHistoryList()
{
return EDITOR_HISTORY_LIST ?? (EDITOR_HISTORY_LIST = new EditorHistoryList());
}
public static bool IsLoaded()
{
return EDITOR_HISTORY_LIST != null;
}
public static void RefreshAll()
{
if (EDITOR_HISTORY_LIST == null)
return;
List<EditorHistoryList.Entry> entries = EDITOR_HISTORY_LIST.entries;
for (var i = 0; i < entries.Count; i++)
{
entries[i].Refresh();
}
}
}
}