Merge pull request #239 from AdenKoperczak/fix_local_images_on_linux

Fix local images on Linux
This commit is contained in:
Dan Paulat 2024-06-29 19:28:34 -05:00 committed by GitHub
commit 60aed45450
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -390,17 +390,19 @@ TextureAtlas::Impl::LoadImage(const std::string& imagePath)
QUrl url = QUrl::fromUserInput(qImagePath);
if (url.isLocalFile())
{
QString suffix = QFileInfo(qImagePath).suffix().toLower();
QString qLocalImagePath = url.toString(QUrl::PreferLocalFile);
if (suffix == "svg")
{
image = ReadSvgFile(qImagePath);
image = ReadSvgFile(qLocalImagePath);
}
else
{
image = ReadPngFile(qImagePath);
image = ReadPngFile(qLocalImagePath);
}
}
else