mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 13:37:42 -05:00
fix: Workspaces not always loading layout correctly
This commit is contained in:
@@ -528,11 +528,6 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
});
|
||||
|
||||
EventProviderCreated::subscribe([](auto) {
|
||||
if (!isAnyViewOpen())
|
||||
loadDefaultLayout();
|
||||
});
|
||||
|
||||
EventWindowInitialized::subscribe([] {
|
||||
// Documentation of the value above the setting definition
|
||||
auto allowServerContact = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.server_contact", 2);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#include <hex/api/content_registry.hpp>
|
||||
#include <hex/api/task_manager.hpp>
|
||||
#include <hex/api/workspace_manager.hpp>
|
||||
|
||||
#include <hex/helpers/fs.hpp>
|
||||
#include <wolv/utils/guards.hpp>
|
||||
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
@@ -21,7 +21,10 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
|
||||
std::string currentWorkspace = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.curr_workspace", "Default");
|
||||
WorkspaceManager::switchWorkspace(currentWorkspace);
|
||||
|
||||
TaskManager::doLater([currentWorkspace] {
|
||||
WorkspaceManager::switchWorkspace(currentWorkspace);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user