mirror of https://github.com/WerWolv/ImHex
fix: Post-pone file opening till everything has been initialized
This commit is contained in:
parent
347fc3ed9f
commit
3f9ce561b9
|
|
@ -40,6 +40,7 @@
|
|||
namespace hex::plugin::builtin {
|
||||
|
||||
static void openFile(const std::fs::path &path) {
|
||||
TaskManager::doLater([path] {
|
||||
if (path.extension() == ".hexproj") {
|
||||
if (!ProjectFile::load(path)) {
|
||||
ui::ToastError::open(fmt::format("hex.builtin.popup.error.project.load"_lang, wolv::util::toUTF8String(path)));
|
||||
|
|
@ -64,6 +65,7 @@ namespace hex::plugin::builtin {
|
|||
glfwRequestWindowAttention(ImHexApi::System::getMainWindowHandle());
|
||||
glfwFocusWindow(ImHexApi::System::getMainWindowHandle());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void registerEventHandlers() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue