diff --git a/MatterControlLib/Library/Interfaces/ILibraryContainer.cs b/MatterControlLib/Library/Interfaces/ILibraryContainer.cs index f680566d4..03259e04f 100644 --- a/MatterControlLib/Library/Interfaces/ILibraryContainer.cs +++ b/MatterControlLib/Library/Interfaces/ILibraryContainer.cs @@ -35,17 +35,19 @@ using MatterHackers.DataConverters3D; namespace MatterHackers.MatterControl.Library { + [Flags] public enum SortKey { - Default, - Name, - CreatedDate, - ModifiedDate, + Default = 0, + Name = 1, + CreatedDate = 2, + ModifiedDate = 4, } public class SortBehavior { public SortKey SortKey { get; set; } + public bool Ascending { get; set; } } diff --git a/MatterControlLib/Library/Providers/LibraryConfig.cs b/MatterControlLib/Library/Providers/LibraryConfig.cs index 1d395a20e..4f39c336d 100644 --- a/MatterControlLib/Library/Providers/LibraryConfig.cs +++ b/MatterControlLib/Library/Providers/LibraryConfig.cs @@ -63,6 +63,7 @@ namespace MatterHackers.MatterControl.Library public class LibraryConfig : ILibraryContext { public event EventHandler ContainerChanged; + public event EventHandler ContentChanged; private List libraryProviders; diff --git a/MatterControlLib/Library/Providers/MatterControl/RootHistoryContainer.cs b/MatterControlLib/Library/Providers/MatterControl/RootHistoryContainer.cs index b71bd323d..c5c1ab678 100644 --- a/MatterControlLib/Library/Providers/MatterControl/RootHistoryContainer.cs +++ b/MatterControlLib/Library/Providers/MatterControl/RootHistoryContainer.cs @@ -62,9 +62,15 @@ namespace MatterHackers.MatterControl.Library () => "Print History".Localize(), AggContext.StaticData.LoadIcon(Path.Combine("Library", "history_20x20.png")), AggContext.StaticData.LoadIcon(Path.Combine("Library", "history_folder.png")), - () => new PrintHistoryContainer()) + () => new PrintHistoryContainer() + { + DefaultSort = new SortBehavior() + { + SortKey = SortKey.ModifiedDate, + } + }) { - IsReadOnly = true + IsReadOnly = true, }); } } diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index 53d8d2546..3363e1f8b 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit 53d8d254671058aa3f52a52bb7e7606a587041bf +Subproject commit 3363e1f8b180074b61fc7838c0d471046c91ed96