mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
feat: Allow workspaces to be deleted the same way as layouts
Fixed #1576
This commit is contained in:
@@ -7,23 +7,9 @@
|
||||
namespace hex::plugin::builtin {
|
||||
|
||||
void loadWorkspaces() {
|
||||
WorkspaceManager::reset();
|
||||
|
||||
for (const auto &defaultPath : fs::getDefaultPaths(fs::ImHexPath::Workspaces)) {
|
||||
for (const auto &entry : std::fs::directory_iterator(defaultPath)) {
|
||||
if (!entry.is_regular_file())
|
||||
continue;
|
||||
|
||||
const auto &path = entry.path();
|
||||
if (path.extension() != ".hexws")
|
||||
continue;
|
||||
|
||||
WorkspaceManager::importFromFile(path);
|
||||
}
|
||||
}
|
||||
|
||||
std::string currentWorkspace = ContentRegistry::Settings::read<std::string>("hex.builtin.setting.general", "hex.builtin.setting.general.curr_workspace", "Default");
|
||||
WorkspaceManager::reload();
|
||||
|
||||
auto currentWorkspace = ContentRegistry::Settings::read<std::string>("hex.builtin.setting.general", "hex.builtin.setting.general.curr_workspace", "Default");
|
||||
TaskManager::doLater([currentWorkspace] {
|
||||
WorkspaceManager::switchWorkspace(currentWorkspace);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user