2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

fixed opening of uncompressed image sent from clipboard, intro refactoring finished

This commit is contained in:
John Preston
2016-03-16 14:54:37 +03:00
parent d58e63c82f
commit c2f1e95f3f
13 changed files with 115 additions and 112 deletions

View File

@@ -224,12 +224,8 @@ void StickerSetInner::paintEvent(QPaintEvent *e) {
if (doc->status == FileReady) {
doc->automaticLoad(0);
}
if (doc->sticker()->img->isNull() && doc->loaded() && doc->loaded(true)) {
if (doc->data().isEmpty()) {
doc->sticker()->img = ImagePtr(doc->already());
} else {
doc->sticker()->img = ImagePtr(doc->data());
}
if (doc->sticker()->img->isNull() && doc->loaded(DocumentData::FilePathResolveChecked)) {
doc->sticker()->img = doc->data().isEmpty() ? ImagePtr(doc->filepath()) : ImagePtr(doc->data());
}
}