fixed image size now updating on load

This commit is contained in:
fourtf 2018-08-09 17:04:15 +02:00
parent 878daf6eee
commit bb76a632f4

View file

@ -261,16 +261,15 @@ void Image::load()
QImageReader reader(&buffer); QImageReader reader(&buffer);
this->frames_ = readFrames(reader, this->url()); this->frames_ = readFrames(reader, this->url());
if (!loadedEventQueued) {
QTimer::singleShot(150, [] {
getApp()->windows->forceLayoutChannelViews();
loadedEventQueued = false;
});
}
return Success; return Success;
}); });
req.onError([this, weak = weakOf(this)](int) {
auto shared = weak.lock();
if (!shared) return false;
this->frames_ = std::vector<Frame>();
return false;
});
req.execute(); req.execute();
} }