Resize meshContentProvider result if required, fix SetUnsized bug
- Issue MatterHackers/MCCentral#4347 Fix thumbnail centering for missing item
This commit is contained in:
parent
d04406c8cc
commit
9dfbd1cd77
3 changed files with 11 additions and 13 deletions
|
|
@ -88,11 +88,6 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
get
|
||||
{
|
||||
if (menuVisible)
|
||||
{
|
||||
var a = 1;
|
||||
}
|
||||
|
||||
if (base.BackgroundColor != Color.Transparent)
|
||||
{
|
||||
return base.BackgroundColor;
|
||||
|
|
@ -112,10 +107,6 @@ namespace MatterHackers.MatterControl
|
|||
}
|
||||
set
|
||||
{
|
||||
if (value.GetAsHTMLString() == "#333333")
|
||||
{
|
||||
var a = 1;
|
||||
}
|
||||
base.BackgroundColor = value;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ namespace MatterHackers.MatterControl
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
public async Task<ImageBuffer> GetThumbnail(ILibraryItem libraryItem, int width, int height)
|
||||
{
|
||||
IObject3D object3D = null;
|
||||
|
|
@ -175,6 +174,6 @@ namespace MatterHackers.MatterControl
|
|||
allowMultiThreading: !ApplicationController.Instance.ActivePrinter.Connection.PrinterIsPrinting);
|
||||
}
|
||||
|
||||
public ImageBuffer DefaultImage => AggContext.StaticData.LoadIcon("mesh.png");
|
||||
public ImageBuffer DefaultImage { get; } = AggContext.StaticData.LoadIcon("mesh.png");
|
||||
}
|
||||
}
|
||||
|
|
@ -121,7 +121,15 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
requeueRaytraceOnDraw = false;
|
||||
raytracePending = false;
|
||||
|
||||
this.SetSizedThumbnail(thumbnail);
|
||||
if (thumbnail.Width != thumbWidth
|
||||
|| thumbnail.Height != thumbHeight)
|
||||
{
|
||||
this.SetUnsizedThumbnail(thumbnail);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.SetSizedThumbnail(thumbnail);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -184,7 +192,7 @@ namespace MatterHackers.MatterControl.CustomWidgets
|
|||
{
|
||||
this.SetSizedThumbnail(
|
||||
ApplicationController.Instance.Library.EnsureCorrectThumbnailSizing(
|
||||
theme.GeneratingThumbnailIcon,
|
||||
thumbnail,
|
||||
thumbWidth,
|
||||
thumbHeight));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue