fix: clear colours preview when lock cleared

Closes #1522
This commit is contained in:
2 * r + 2 * t 2026-06-08 18:33:45 +10:00
parent 8a3bb46db6
commit 66a9f2f220

View file

@ -20,6 +20,7 @@ Searcher {
property string previewPath property string previewPath
property string actualCurrent property string actualCurrent
property bool previewColourLock property bool previewColourLock
property bool pendingPreviewClear
function getCategoryFor(w: FileSystemEntry): string { function getCategoryFor(w: FileSystemEntry): string {
let category = w.parentDir.slice(Paths.wallsdir.length + 1); let category = w.parentDir.slice(Paths.wallsdir.length + 1);
@ -47,7 +48,14 @@ Searcher {
function stopPreview(): void { function stopPreview(): void {
showPreview = false; showPreview = false;
if (!previewColourLock) if (previewColourLock)
pendingPreviewClear = true;
else
Colours.showPreview = false;
}
onPreviewColourLockChanged: {
if (!previewColourLock && pendingPreviewClear)
Colours.showPreview = false; Colours.showPreview = false;
} }