impr: Handle provider opening more centrally, switch to existing provider if same file is being opened again

This commit is contained in:
WerWolv
2025-12-17 12:55:24 +01:00
parent c11c05a399
commit 89004574d3
48 changed files with 211 additions and 158 deletions

View File

@@ -391,7 +391,7 @@ namespace hex {
if (skipLoadInterface)
provider->skipLoadInterface();
EventProviderCreated::post(provider.get());
EventProviderCreated::post(provider);
s_providers->emplace_back(std::move(provider));
if (select || s_providers->size() == 1)
@@ -498,6 +498,10 @@ namespace hex {
return result;
}
void openProvider(std::shared_ptr<prv::Provider> provider) {
RequestOpenProvider::post(provider);
}
}
namespace ImHexApi::System {