From cc2fa957d9771032a8a86ba95bb3bf2c7f758980 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Wed, 20 Jun 2018 16:28:10 -0700 Subject: [PATCH] Allow non-MeshContent providers to supply thumbnails --- Library/Widgets/ListView/ListViewItemBase.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Library/Widgets/ListView/ListViewItemBase.cs b/Library/Widgets/ListView/ListViewItemBase.cs index 039db946c..d30ff7c51 100644 --- a/Library/Widgets/ListView/ListViewItemBase.cs +++ b/Library/Widgets/ListView/ListViewItemBase.cs @@ -112,6 +112,18 @@ namespace MatterHackers.MatterControl.CustomWidgets // Schedule work this.ScheduleRaytraceOperation(); } + else + { + // Show processing image + this.SetItemThumbnail(generatingThumbnailIcon, raytracedImage: false); + + // Ask the provider for a content specific thumbnail + await contentProvider.GetThumbnail( + libraryItem, + thumbWidth, + thumbHeight, + this.SetItemThumbnail); + } } }