Rearranged profile initializations and verified that all init correctly

This commit is contained in:
GPayne
2021-09-12 21:05:00 -06:00
parent 284c68f952
commit 51f6c9d45b
17 changed files with 231 additions and 683 deletions

View File

@@ -142,23 +142,6 @@ std::string KeybindingManager::generateJson() const {
return json.str();
}
void KeybindingManager::setFromProfile_keybindings(const Profile& p)
{
for (Profile::Keybinding k : p.keybindings) {
if (k.action.empty()) {
LERROR("Action must not be empty");
}
if (!global::actionManager->hasAction(k.action)) {
LERROR(fmt::format("Action '{}' does not exist", k.action));
}
if (k.key.key == openspace::Key::Unknown) {
LERROR(fmt::format("Could not find key '{}'",
std::to_string(static_cast<uint16_t>(k.key.key))));
}
bindKey(k.key.key, k.key.modifier, k.action);
}
}
scripting::LuaLibrary KeybindingManager::luaLibrary() {
return {
"",