1
0
mirror of synced 2024-11-24 15:50:16 +01:00

fix: ProviderChanged Event not being called correctly when closing first provider

Fixes #1421, Fixes #1416
This commit is contained in:
WerWolv 2023-12-14 20:46:53 +01:00
parent c1f76be3b7
commit 78ef5b0d07

View File

@ -321,6 +321,9 @@ namespace hex {
if (it == s_providers.begin()) {
// If the first provider is being closed, select the one that's the first one now
setCurrentProvider(0);
if (s_providers.size() > 1)
EventProviderChanged::post(s_providers[0], s_providers[1]);
}
else if (std::distance(s_providers.begin(), it) == s_currentProvider) {
// If the current provider is being closed, select the one that's before it