From 33f0d59545b11f2e2440894a2c7c5ad2954c698a Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 28 Jul 2023 00:01:49 +0200 Subject: [PATCH] fix: Bad formatting of project open error popup --- plugins/builtin/source/content/events.cpp | 5 +++-- plugins/builtin/source/content/global_actions.cpp | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/builtin/source/content/events.cpp b/plugins/builtin/source/content/events.cpp index 2af265b43..4170ed049 100644 --- a/plugins/builtin/source/content/events.cpp +++ b/plugins/builtin/source/content/events.cpp @@ -11,6 +11,7 @@ #include #include +#include #include #include @@ -91,7 +92,7 @@ namespace hex::plugin::builtin { fs::openFileBrowser(fs::DialogMode::Open, { }, [](const auto &path) { if (path.extension() == ".hexproj") { if (!ProjectFile::load(path)) { - PopupError::open("hex.builtin.popup.error.project.load"_lang); + PopupError::open(hex::format("hex.builtin.popup.error.project.load"_lang, wolv::util::toUTF8String(path))); } } else { FileProvider* newProvider = static_cast( @@ -112,7 +113,7 @@ namespace hex::plugin::builtin { fs::openFileBrowser(fs::DialogMode::Open, { {"Project File", "hexproj"} }, [](const auto &path) { if (!ProjectFile::load(path)) { - PopupError::open("hex.builtin.popup.error.project.load"_lang); + PopupError::open(hex::format("hex.builtin.popup.error.project.load"_lang, wolv::util::toUTF8String(path))); } }); } diff --git a/plugins/builtin/source/content/global_actions.cpp b/plugins/builtin/source/content/global_actions.cpp index 2d03a1559..1822bca66 100644 --- a/plugins/builtin/source/content/global_actions.cpp +++ b/plugins/builtin/source/content/global_actions.cpp @@ -5,13 +5,15 @@ #include +#include + namespace hex::plugin::builtin { void openProject() { fs::openFileBrowser(fs::DialogMode::Open, { {"Project File", "hexproj"} }, [](const auto &path) { if (!ProjectFile::load(path)) { - PopupError::open("hex.builtin.popup.error.project.load"_lang); + PopupError::open(hex::format("hex.builtin.popup.error.project.load"_lang, wolv::util::toUTF8String(path))); } }); }