diff --git a/MatterControlLib/ApplicationView/WrappedLibraryContainer.cs b/MatterControlLib/ApplicationView/WrappedLibraryContainer.cs index db4fd9d3d..2790c02f7 100644 --- a/MatterControlLib/ApplicationView/WrappedLibraryContainer.cs +++ b/MatterControlLib/ApplicationView/WrappedLibraryContainer.cs @@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl public bool IsProtected => _libraryContainer.IsProtected; - public Type DefaultView => _libraryContainer.DefaultView; + public Type ViewOverride => _libraryContainer.ViewOverride; public SafeList ChildContainers => new SafeList(this.ExtraContainers.Concat(_libraryContainer.ChildContainers)); diff --git a/MatterControlLib/Library/Interfaces/ILibraryContainer.cs b/MatterControlLib/Library/Interfaces/ILibraryContainer.cs index 9f2add94e..aede7aef1 100644 --- a/MatterControlLib/Library/Interfaces/ILibraryContainer.cs +++ b/MatterControlLib/Library/Interfaces/ILibraryContainer.cs @@ -59,7 +59,10 @@ namespace MatterHackers.MatterControl.Library LibrarySortBehavior DefaultSort { get; } - Type DefaultView { get; } + /// + /// Allows a container to override defaults and user preferences, to display a custom view type when constructed + /// + Type ViewOverride { get; } string ID { get; } diff --git a/MatterControlLib/Library/Providers/LibraryContainer.cs b/MatterControlLib/Library/Providers/LibraryContainer.cs index 32623dcc4..58de7eee2 100644 --- a/MatterControlLib/Library/Providers/LibraryContainer.cs +++ b/MatterControlLib/Library/Providers/LibraryContainer.cs @@ -46,7 +46,7 @@ namespace MatterHackers.MatterControl.Library public string CollectionKeyName { get; set; } - public Type DefaultView { get; protected set; } + public Type ViewOverride { get; protected set; } public SafeList ChildContainers { get; set; } = new SafeList(); diff --git a/MatterControlLib/Library/Providers/MatterControl/PrintHistoryContainer.cs b/MatterControlLib/Library/Providers/MatterControl/PrintHistoryContainer.cs index 154faa7a3..ef332d934 100644 --- a/MatterControlLib/Library/Providers/MatterControl/PrintHistoryContainer.cs +++ b/MatterControlLib/Library/Providers/MatterControl/PrintHistoryContainer.cs @@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.Library this.ChildContainers = new SafeList(); this.Items = new SafeList(); this.Name = "Print History".Localize(); - this.DefaultView = typeof(HistoryListView); + this.ViewOverride = typeof(HistoryListView); PrintHistoryData.Instance.HistoryCleared.RegisterEvent(HistoryChanged, ref unregisterEvents); ApplicationController.Instance.AnyPrintStarted += HistoryChanged; diff --git a/MatterControlLib/Library/Providers/RootLibraryContainer.cs b/MatterControlLib/Library/Providers/RootLibraryContainer.cs index 5e3b12693..ea7a6cf2b 100644 --- a/MatterControlLib/Library/Providers/RootLibraryContainer.cs +++ b/MatterControlLib/Library/Providers/RootLibraryContainer.cs @@ -48,7 +48,7 @@ namespace MatterHackers.MatterControl.Library public ILibraryContainer Parent { get; set; } = null; - public Type DefaultView { get; } = null; + public Type ViewOverride { get; } = null; public string ID { get; } = "rootLibraryProvider";