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.
| 211 | // is true, queues the thumbnail operation on the texture loader. |
| 212 | // If no thumbnail exists, it will use the default filesystem icon. |
| 213 | void 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 | |
| 232 | FileSystemPile *FileSystemActor::pileize() |
| 233 | { |
no test coverage detected