fix: ProviderChanged Event not being called correctly when closing first provider
Fixes #1421, Fixes #1416
This commit is contained in:
parent
c1f76be3b7
commit
78ef5b0d07
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user