- 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
37 lines
923 B
C#
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();
|
|
}
|
|
}
|
|
}
|
|
} |