From 9c41ce7841a87271a5bbd4f145c453f158f03622 Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Sat, 29 Jun 2024 10:31:45 -0400 Subject: [PATCH] Fix for local placefiles on linux --- scwx-qt/source/scwx/qt/util/texture_atlas.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scwx-qt/source/scwx/qt/util/texture_atlas.cpp b/scwx-qt/source/scwx/qt/util/texture_atlas.cpp index 554cecbe..be2d49a4 100644 --- a/scwx-qt/source/scwx/qt/util/texture_atlas.cpp +++ b/scwx-qt/source/scwx/qt/util/texture_atlas.cpp @@ -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.toLocalFile(); if (suffix == "svg") { - image = ReadSvgFile(qImagePath); + image = ReadSvgFile(qLocalImagePath); } else { - image = ReadPngFile(qImagePath); + image = ReadPngFile(qLocalImagePath); } } else