MCPcopy Create free account
hub / github.com/bumptop/BumpTop / enableThumbnail

Method enableThumbnail

trunk/win/Source/BT_FileSystemActor.cpp:213–230  ·  view source on GitHub ↗

Sets whether this actor should be thumbnailed at all, and if loadThumbnail is true, queues the thumbnail operation on the texture loader. If no thumbnail exists, it will use the default filesystem icon.

Source from the content-addressed store, hash-verified

211// is true, queues the thumbnail operation on the texture loader.
212// If no thumbnail exists, it will use the default filesystem icon.
213void FileSystemActor::enableThumbnail(bool enableThumbnail/*=true*/, bool loadThumbnail/*=true*/)
214{
215 useThumbnail = enableThumbnail;
216
217 // Load this Thumbnail because it wasn't loaded before
218 if (useThumbnail)
219 {
220 GLTextureDetail detail = SampledImage;
221 // NOTE: workaround for keeping training images in hires
222 // also use hi-res if user wants to skip thumbs db usage
223 bool isTrainingImage = getFullPath().startsWith(native(winOS->GetTrainingDirectory()), Qt::CaseInsensitive);
224 if (!GLOBAL(settings).useThumbsDb || isTrainingImage)
225 detail = HiResImage;
226
227 if (loadThumbnail)
228 loadThumbnailTexture(GLTextureObject(Load|Reload, _alternateThumbnailId, getTargetPath(), detail, NormalPriority, true, isFileSystemType(Image)));
229 }
230}
231
232FileSystemPile *FileSystemActor::pileize()
233{

Callers 12

onFileModifiedMethod · 0.80
onFileAddedMethod · 0.80
FadeAndDeleteActorFunction · 0.80
loadImageDirAsObjectsFunction · 0.80
LoadSingleFileFunction · 0.80
unserializeActor_v2Method · 0.80
unserializeActor_v3Method · 0.80
unserializeActor_v4Method · 0.80
unserializeActor_v5Method · 0.80
unserializeActor_v6Method · 0.80
unserializeActor_v7Method · 0.80
unserializeActor_v8Method · 0.80

Calls 4

GLTextureObjectClass · 0.85
GetTrainingDirectoryMethod · 0.80
nativeFunction · 0.70
startsWithMethod · 0.45

Tested by

no test coverage detected