mirror of https://github.com/procxx/kepka.git
Fix preview of color-only backgrounds.
Regression was introduced in f506a5ea6c
.
This commit is contained in:
parent
c47781c25a
commit
b43191506a
|
@ -368,8 +368,6 @@ BackgroundPreviewBox::BackgroundPreviewBox(
|
||||||
true))
|
true))
|
||||||
, _paper(paper)
|
, _paper(paper)
|
||||||
, _radial(animation(this, &BackgroundPreviewBox::step_radial)) {
|
, _radial(animation(this, &BackgroundPreviewBox::step_radial)) {
|
||||||
Expects(_paper.thumbnail() != nullptr);
|
|
||||||
|
|
||||||
subscribe(Auth().downloaderTaskFinished(), [=] { update(); });
|
subscribe(Auth().downloaderTaskFinished(), [=] { update(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -540,10 +538,8 @@ void BackgroundPreviewBox::step_radial(TimeMs ms, bool timer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BackgroundPreviewBox::setScaledFromThumb() {
|
bool BackgroundPreviewBox::setScaledFromThumb() {
|
||||||
Expects(_paper.thumbnail() != nullptr);
|
|
||||||
|
|
||||||
const auto thumbnail = _paper.thumbnail();
|
const auto thumbnail = _paper.thumbnail();
|
||||||
if (!thumbnail->loaded()) {
|
if (!thumbnail || !thumbnail->loaded()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
setScaledFromImage(PrepareScaledFromFull(
|
setScaledFromImage(PrepareScaledFromFull(
|
||||||
|
|
Loading…
Reference in New Issue