svg_loader: forcing file loading completion

Svgs without any viewbox and width/height information
have to be loaded before any other action is taken.
This is necessary to get the valid sive/viewbox info.
This commit is contained in:
Mira Grudzinska 2023-03-26 15:08:21 +02:00 committed by Mira Grudzinska
parent 1e088a6a61
commit c7137a8105

View file

@ -3327,6 +3327,12 @@ bool SvgLoader::read()
TaskScheduler::request(this);
//In case no viewbox and width/height data is provided the completion of loading
//has to be forced, in order to establish this data based on the whole picture bounding box.
if (!((uint32_t)viewFlag & (uint32_t)SvgViewFlag::Viewbox) &&
(!((uint32_t)viewFlag & (uint32_t)SvgViewFlag::Width) || !((uint32_t)viewFlag & (uint32_t)SvgViewFlag::Height)))
this->done();
return true;
}