diff --git a/CMakeLists.txt b/CMakeLists.txt index c98aff7473..cd4db55f5a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,9 +27,9 @@ cmake_minimum_required(VERSION 3.8 FATAL_ERROR) project(OpenSpace) set(OPENSPACE_VERSION_MAJOR 0) -set(OPENSPACE_VERSION_MINOR 12) -set(OPENSPACE_VERSION_PATCH 1) -set(OPENSPACE_VERSION_STRING "Beta-2 (WIP)") +set(OPENSPACE_VERSION_MINOR 13) +set(OPENSPACE_VERSION_PATCH 0) +set(OPENSPACE_VERSION_STRING "Beta-3") set(OPENSPACE_BASE_DIR "${PROJECT_SOURCE_DIR}") diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 029c43a11b..507c6e3e81 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -780,10 +780,10 @@ void setSgctDelegateFunctions() { sgct::Engine::NonLinearBuffer); }; sgctDelegate.isFisheyeRendering = []() { - //sgct::SGCTWindow* w = sgct::Engine::instance()->getCurrentWindowPtr(); - return false;// dynamic_cast( - //w->getViewport(0)->getNonLinearProjectionPtr() - //) != nullptr; + sgct::SGCTWindow* w = sgct::Engine::instance()->getCurrentWindowPtr(); + return dynamic_cast( + w->getViewport(0)->getNonLinearProjectionPtr() + ) != nullptr; }; sgctDelegate.takeScreenshot = [](bool applyWarping) { sgct::SGCTSettings::instance()->setCaptureFromBackBuffer(applyWarping); diff --git a/data/assets/recording_test.scene b/data/assets/recording_test.scene deleted file mode 100644 index 470b8bca3b..0000000000 --- a/data/assets/recording_test.scene +++ /dev/null @@ -1,34 +0,0 @@ -local sceneHelper = asset.require('util/scene_helper') -local propertyHelper = asset.require('util/property_helper') - --- Specifying which other assets should be loaded in this scene -asset.require('spice/base') -assetHelper.requestAll(asset, 'scene/solarsystem/sun') -asset.require('scene/solarsystem/planets/earth/earth') -asset.require('scene/digitaluniverse/constellationbounds') -asset.require('util/default_keybindings') -asset.require('util/default_dashboard') - -asset.onInitialize(function () - openspace.time.setTime("2010 AUG 01") - - - openspace.navigation.setCameraState({ - Focus = "Earth", - Position = { -1500000000000, 0, 0 }, - Rotation = { 0.0, 0.0, 1.0, 1.0 }, - }) - - openspace.navigation.setCameraState({ - Focus = "Sun", - Position = { 100000000000, 0, 0 }, - Rotation = { 0.0, 0.0, 1.0, 1.0 }, - }) - - openspace.setPropertyValue('Scene.ConstellationBounds.renderable.Enabled', true) - openspace.setPropertyValueSingle('Scene.Earth.RenderableGlobe.Enabled', false); - openspace.setPropertyValueSingle('Scene.EarthTrail.renderable.Enabled', false); - openspace.time.interpolateTogglePause() - -end) - diff --git a/ext/ghoul b/ext/ghoul index 2494e6b299..8ee02ddbb6 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 2494e6b29900eac99c7f432c89d4c8fa0556887f +Subproject commit 8ee02ddbb6ce0935128d44750dab31270e4062f0 diff --git a/include/openspace/scene/scenegraphnode.h b/include/openspace/scene/scenegraphnode.h index 6be9f1a2c6..b421f1008d 100644 --- a/include/openspace/scene/scenegraphnode.h +++ b/include/openspace/scene/scenegraphnode.h @@ -27,14 +27,14 @@ #include +#include +#include #include #include #include #include #include #include -#include -#include //#define Debugging_Core_SceneGraphNode_Indices diff --git a/include/openspace/util/spicemanager.h b/include/openspace/util/spicemanager.h index 5d3e261084..55abb8f14a 100644 --- a/include/openspace/util/spicemanager.h +++ b/include/openspace/util/spicemanager.h @@ -46,7 +46,7 @@ public: using KernelHandle = unsigned int; struct SpiceException : public ghoul::RuntimeError { - explicit SpiceException(const std::string& msg); + explicit SpiceException(std::string msg); }; /** diff --git a/modules/cefwebgui/include/guikeyboardhandler.h b/modules/cefwebgui/include/guikeyboardhandler.h index 6fb0401410..34344e172c 100644 --- a/modules/cefwebgui/include/guikeyboardhandler.h +++ b/modules/cefwebgui/include/guikeyboardhandler.h @@ -27,18 +27,12 @@ #include -#include -#include - namespace openspace { class GUIKeyboardHandler : public WebKeyboardHandler { public: GUIKeyboardHandler(); - virtual ~GUIKeyboardHandler(); - -private: - + virtual ~GUIKeyboardHandler() = default; }; } // namespace openspace diff --git a/modules/cefwebgui/src/guikeyboardhandler.cpp b/modules/cefwebgui/src/guikeyboardhandler.cpp index c66a1fd19c..a85ebc5bb2 100644 --- a/modules/cefwebgui/src/guikeyboardhandler.cpp +++ b/modules/cefwebgui/src/guikeyboardhandler.cpp @@ -37,7 +37,6 @@ namespace { namespace openspace { GUIKeyboardHandler::GUIKeyboardHandler() { - _keyConsumed = false; global::callback::keyboard.push_back( @@ -53,8 +52,4 @@ GUIKeyboardHandler::GUIKeyboardHandler() { ); } -GUIKeyboardHandler::~GUIKeyboardHandler() { - -} - } // namespace openspace diff --git a/modules/server/include/topics/shortcuttopic.h b/modules/server/include/topics/shortcuttopic.h index 054ba583ea..4958f171eb 100644 --- a/modules/server/include/topics/shortcuttopic.h +++ b/modules/server/include/topics/shortcuttopic.h @@ -31,8 +31,7 @@ namespace openspace { class ShortcutTopic : public Topic { public: - ShortcutTopic(); - virtual ~ShortcutTopic(); + virtual ~ShortcutTopic() = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/include/topics/versiontopic.h b/modules/server/include/topics/versiontopic.h index aaba65e18c..7238f33eaf 100644 --- a/modules/server/include/topics/versiontopic.h +++ b/modules/server/include/topics/versiontopic.h @@ -31,8 +31,7 @@ namespace openspace { class VersionTopic : public Topic { public: - VersionTopic(); - virtual ~VersionTopic(); + virtual ~VersionTopic() = default; void handleJson(const nlohmann::json& json) override; bool isDone() const override; diff --git a/modules/server/src/topics/shortcuttopic.cpp b/modules/server/src/topics/shortcuttopic.cpp index 4652cd1d25..f500d30f1c 100644 --- a/modules/server/src/topics/shortcuttopic.cpp +++ b/modules/server/src/topics/shortcuttopic.cpp @@ -25,11 +25,7 @@ #include #include -#include - -#include #include - #include #include @@ -43,10 +39,6 @@ using nlohmann::json; namespace openspace { -ShortcutTopic::ShortcutTopic() {} - -ShortcutTopic::~ShortcutTopic() {} - bool ShortcutTopic::isDone() const { return true; } @@ -82,10 +74,10 @@ std::vector ShortcutTopic::shortcutsJson() const { { "key", ghoul::to_string(k.key) }, { "modifiers", { - {"shift" , hasKeyModifier(k.modifier, KeyModifier::Shift) }, - {"control" , hasKeyModifier(k.modifier, KeyModifier::Control) }, - {"alt" , hasKeyModifier(k.modifier, KeyModifier::Alt) }, - {"super" , hasKeyModifier(k.modifier, KeyModifier::Super) } + { "shift" , hasKeyModifier(k.modifier, KeyModifier::Shift) }, + { "control" , hasKeyModifier(k.modifier, KeyModifier::Control) }, + { "alt" , hasKeyModifier(k.modifier, KeyModifier::Alt) }, + { "super" , hasKeyModifier(k.modifier, KeyModifier::Super) } } }, { "name", info.name }, @@ -100,9 +92,7 @@ std::vector ShortcutTopic::shortcutsJson() const { } void ShortcutTopic::sendData() const { - nlohmann::json data = { - {"shortcuts", shortcutsJson()} - }; + nlohmann::json data = { {"shortcuts", shortcutsJson()} }; _connection->sendJson(wrappedPayload(data)); } diff --git a/modules/server/src/topics/versiontopic.cpp b/modules/server/src/topics/versiontopic.cpp index 7ecffc7268..c1c59fe400 100644 --- a/modules/server/src/topics/versiontopic.cpp +++ b/modules/server/src/topics/versiontopic.cpp @@ -26,24 +26,14 @@ #include #include - #include -#include namespace { constexpr const char* _loggerCat = "VersionTopic"; } // namespace -using nlohmann::json; - namespace openspace { -VersionTopic::VersionTopic() { -} - -VersionTopic::~VersionTopic() { -} - bool VersionTopic::isDone() const { return true; } @@ -53,24 +43,22 @@ void VersionTopic::handleJson(const nlohmann::json&) { { "openSpaceVersion", { - {"major", OPENSPACE_VERSION_MAJOR}, - {"minor", OPENSPACE_VERSION_MINOR}, - {"patch", OPENSPACE_VERSION_PATCH} + { "major", OPENSPACE_VERSION_MAJOR }, + { "minor", OPENSPACE_VERSION_MINOR }, + { "patch", OPENSPACE_VERSION_PATCH } } }, { "socketApiVersion", { - {"major", SOCKET_API_VERSION_MAJOR}, - {"minor", SOCKET_API_VERSION_MINOR}, - {"patch", SOCKET_API_VERSION_PATCH} + { "major", SOCKET_API_VERSION_MAJOR }, + { "minor", SOCKET_API_VERSION_MINOR }, + { "patch", SOCKET_API_VERSION_PATCH } } } }; - _connection->sendJson( - wrappedPayload(versionJson) - ); + _connection->sendJson(wrappedPayload(versionJson)); } } // namespace openspace diff --git a/modules/webbrowser/include/browserclient.h b/modules/webbrowser/include/browserclient.h index 120673e580..9839023fc2 100644 --- a/modules/webbrowser/include/browserclient.h +++ b/modules/webbrowser/include/browserclient.h @@ -43,7 +43,7 @@ class WebKeyboardHandler; class BrowserClient : public CefClient { public: - BrowserClient(WebRenderHandler*, WebKeyboardHandler*); + BrowserClient(WebRenderHandler* handler, WebKeyboardHandler* keyboardHandler); CefRefPtr GetRenderHandler() override; CefRefPtr GetLifeSpanHandler() override; diff --git a/modules/webbrowser/include/browserinstance.h b/modules/webbrowser/include/browserinstance.h index 296ad9eba9..327de457d1 100644 --- a/modules/webbrowser/include/browserinstance.h +++ b/modules/webbrowser/include/browserinstance.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H -#define __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H +#ifndef __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H__ +#define __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H__ #ifdef _MSC_VER #pragma warning (push) @@ -47,7 +47,7 @@ class WebKeyboardHandler; class BrowserInstance { public: - BrowserInstance(WebRenderHandler* renderer, WebKeyboardHandler *keyboardHandler); + BrowserInstance(WebRenderHandler* renderer, WebKeyboardHandler* keyboardHandler); ~BrowserInstance(); void loadUrl(const std::string& url); @@ -106,4 +106,4 @@ private: } // namespace openspace -#endif // __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H +#endif // __OPENSPACE_MODULE_WEBBROWSER__BROWSER_INSTANCE_H__ diff --git a/modules/webbrowser/include/webkeyboardhandler.h b/modules/webbrowser/include/webkeyboardhandler.h index 5ea7d572e9..6566a10d49 100644 --- a/modules/webbrowser/include/webkeyboardhandler.h +++ b/modules/webbrowser/include/webkeyboardhandler.h @@ -22,8 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#ifndef __OPENSPACE_MODULE_WEBBROWSER__WEB_KEYBOARD_HANDLER_H -#define __OPENSPACE_MODULE_WEBBROWSER__WEB_KEYBOARD_HANDLER_H +#ifndef __OPENSPACE_MODULE_WEBBROWSER__WEB_KEYBOARD_HANDLER_H__ +#define __OPENSPACE_MODULE_WEBBROWSER__WEB_KEYBOARD_HANDLER_H__ #ifdef _MSC_VER #pragma warning (push) @@ -36,21 +36,20 @@ #pragma warning (pop) #endif // _MSC_VER -#include - namespace openspace { - class WebKeyboardHandler : public CefKeyboardHandler { - public: - - bool OnKeyEvent(CefRefPtr< CefBrowser > browser, const CefKeyEvent& event, CefEventHandle os_event) override; - bool OnPreKeyEvent(CefRefPtr< CefBrowser > browser, const CefKeyEvent& event, CefEventHandle os_event, bool* is_keyboard_shortcut) override; +class WebKeyboardHandler : public CefKeyboardHandler { +public: + bool OnKeyEvent(CefRefPtr browser, const CefKeyEvent& event, + CefEventHandle os_event) override; + bool OnPreKeyEvent(CefRefPtr browser, const CefKeyEvent& event, + CefEventHandle os_event, bool* is_keyboard_shortcut) override; - protected: - bool _keyConsumed; - IMPLEMENT_REFCOUNTING(WebKeyboardHandler); - }; +protected: + bool _keyConsumed = false; + IMPLEMENT_REFCOUNTING(WebKeyboardHandler); +}; } // namespace openspace -#endif // __OPENSPACE_MODULE_WEBBROWSER__WEB_KEYBOARD_HANDLER_H +#endif // __OPENSPACE_MODULE_WEBBROWSER__WEB_KEYBOARD_HANDLER_H__ diff --git a/modules/webbrowser/src/browserclient.cpp b/modules/webbrowser/src/browserclient.cpp index f2d577790e..c7046ecc4a 100644 --- a/modules/webbrowser/src/browserclient.cpp +++ b/modules/webbrowser/src/browserclient.cpp @@ -30,9 +30,10 @@ namespace openspace { -BrowserClient::BrowserClient(WebRenderHandler* handler, WebKeyboardHandler *keyboardHandler) - : _renderHandler(handler), - _keyboardHandler(keyboardHandler) +BrowserClient::BrowserClient(WebRenderHandler* handler, + WebKeyboardHandler* keyboardHandler) + : _renderHandler(handler) + , _keyboardHandler(keyboardHandler) { DefaultBrowserLauncher* browserLauncher = new DefaultBrowserLauncher; _lifeSpanHandler = browserLauncher; diff --git a/modules/webbrowser/src/browserinstance.cpp b/modules/webbrowser/src/browserinstance.cpp index 347c4b39bb..a97e70bc81 100644 --- a/modules/webbrowser/src/browserinstance.cpp +++ b/modules/webbrowser/src/browserinstance.cpp @@ -41,9 +41,10 @@ namespace { namespace openspace { -BrowserInstance::BrowserInstance(WebRenderHandler* renderer, WebKeyboardHandler *keyboardHandler) - : _renderHandler(renderer), - _keyboardHandler(keyboardHandler) +BrowserInstance::BrowserInstance(WebRenderHandler* renderer, + WebKeyboardHandler* keyboardHandler) + : _renderHandler(renderer) + , _keyboardHandler(keyboardHandler) { _client = new BrowserClient(_renderHandler, _keyboardHandler); @@ -123,7 +124,8 @@ bool BrowserInstance::sendKeyEvent(const CefKeyEvent& event) { bool BrowserInstance::sendMouseClickEvent(const CefMouseEvent& event, CefBrowserHost::MouseButtonType button, - bool mouseUp, int clickCount) + bool mouseUp, + int clickCount) { _browser->GetHost()->SendMouseClickEvent(event, button, mouseUp, clickCount); return hasContent(event.x, event.y); diff --git a/modules/webbrowser/src/cefhost.cpp b/modules/webbrowser/src/cefhost.cpp index 4377b95f07..c7513b5f8f 100644 --- a/modules/webbrowser/src/cefhost.cpp +++ b/modules/webbrowser/src/cefhost.cpp @@ -64,8 +64,10 @@ void CefHost::attachDebugSettings(CefSettings &settings) { "Remote WebBrowser debugging available on http://localhost:{}", settings.remote_debugging_port )); - //TODO we shoulnd't need this + +#ifdef __APPLE__ settings.single_process = true; +#endif } void CefHost::doMessageLoopWork() { diff --git a/modules/webbrowser/src/webkeyboardhandler.cpp b/modules/webbrowser/src/webkeyboardhandler.cpp index 11e4d34f18..334642cb91 100644 --- a/modules/webbrowser/src/webkeyboardhandler.cpp +++ b/modules/webbrowser/src/webkeyboardhandler.cpp @@ -24,26 +24,24 @@ #include - -#include -#include - -namespace { - constexpr const char* _loggerCat = "CEF KeyboardHandler"; -} // namespace - - namespace openspace { - bool WebKeyboardHandler::OnKeyEvent(CefRefPtr< CefBrowser > browser, const CefKeyEvent& event, CefEventHandle os_event) { - return false; - } +bool WebKeyboardHandler::OnKeyEvent(CefRefPtr browser, + const CefKeyEvent& event, + CefEventHandle os_event) +{ + return false; +} - bool WebKeyboardHandler::OnPreKeyEvent(CefRefPtr< CefBrowser > browser, const CefKeyEvent& event, CefEventHandle os_event, bool* is_keyboard_shortcut) { - if (event.focus_on_editable_field) { - _keyConsumed = true; - } - return false; +bool WebKeyboardHandler::OnPreKeyEvent(CefRefPtr browser, + const CefKeyEvent& event, + CefEventHandle os_event, + bool* is_keyboard_shortcut) +{ + if (event.focus_on_editable_field) { + _keyConsumed = true; } + return false; +} } // namespace openspace diff --git a/modules/webbrowser/webbrowsermodule.cpp b/modules/webbrowser/webbrowsermodule.cpp index cb837c5212..d47a9b9429 100644 --- a/modules/webbrowser/webbrowsermodule.cpp +++ b/modules/webbrowser/webbrowsermodule.cpp @@ -39,13 +39,12 @@ namespace { constexpr const char* _loggerCat = "WebBrowser"; - #ifdef _MSC_VER - constexpr const char* SubprocessSuffix = ".exe"; + constexpr const char* SubprocessSuf = ".exe"; #elif __APPLE__ - constexpr const char* SubprocessSuffix = ".app/Contents/MacOS/openspace_web_helper"; + constexpr const char* SubprocessSuf = ".app/Contents/MacOS/openspace_web_helper"; #else - constexpr const char* SubprocessSuffix = ""; + constexpr const char* SubprocessSuf = ""; #endif } // namespace @@ -71,9 +70,7 @@ void WebBrowserModule::internalDeinitialize() { } std::string WebBrowserModule::findHelperExecutable() { - std::string execLocation = absPath( - _webHelperLocation + SubprocessSuffix - ); + std::string execLocation = absPath(_webHelperLocation + SubprocessSuf); if (!FileSys.fileExists(execLocation)) { LERROR(fmt::format( "Could not find web helper executable at location: {}" , execLocation @@ -106,13 +103,9 @@ void WebBrowserModule::internalInitialize(const ghoul::Dictionary& dictionary) { LDEBUG("Starting CEF... done!"); global::callback::preSync.push_back([this]() { - if (!_cefHost) { - return; + if (_cefHost && !_browsers.empty()) { + _cefHost->doMessageLoopWork(); } - if (_browsers.empty()) { - return; - } - _cefHost->doMessageLoopWork(); }); _eventHandler.initialize(); @@ -124,10 +117,9 @@ void WebBrowserModule::internalInitialize(const ghoul::Dictionary& dictionary) { } void WebBrowserModule::addBrowser(std::shared_ptr browser) { - if (!_enabled) { - return; + if (_enabled) { + _browsers.push_back(browser); } - _browsers.push_back(browser); } void WebBrowserModule::removeBrowser(std::shared_ptr browser) { @@ -147,17 +139,15 @@ void WebBrowserModule::removeBrowser(std::shared_ptr browser) { void WebBrowserModule::attachEventHandler( std::shared_ptr browserInstance) { - if (!_enabled) { - return; + if (_enabled) { + _eventHandler.setBrowserInstance(browserInstance); } - _eventHandler.setBrowserInstance(browserInstance); } void WebBrowserModule::detachEventHandler() { - if (!_enabled) { - return; + if (_enabled) { + _eventHandler.setBrowserInstance(nullptr); } - _eventHandler.setBrowserInstance(nullptr); } bool WebBrowserModule::isEnabled() const { diff --git a/modules/webgui/webguimodule.cpp b/modules/webgui/webguimodule.cpp index f4403c8693..e77788ebca 100644 --- a/modules/webgui/webguimodule.cpp +++ b/modules/webgui/webguimodule.cpp @@ -24,12 +24,11 @@ #include +#include #include #include #include -#include - namespace { constexpr const char* _loggerCat = "WebGuiModule"; @@ -114,6 +113,4 @@ void WebGuiModule::stopProcess() { _process = nullptr; } - } // namespace openspace - diff --git a/modules/webgui/webguimodule.h b/modules/webgui/webguimodule.h index 71db513189..2932d28403 100644 --- a/modules/webgui/webguimodule.h +++ b/modules/webgui/webguimodule.h @@ -26,11 +26,10 @@ #define __OPENSPACE_MODULE_WEBGUI___WEBGUIMODULE___H__ #include -#include + #include - +#include #include - #include namespace openspace { @@ -42,6 +41,7 @@ public: protected: void internalInitialize(const ghoul::Dictionary&) override; + private: std::unique_ptr _process; properties::BoolProperty _serverProcessEnabled; diff --git a/openspace.cfg b/openspace.cfg index 59988f854a..93fe7d8c12 100644 --- a/openspace.cfg +++ b/openspace.cfg @@ -156,4 +156,4 @@ ServerPasskey = "secret!" ClientAddressWhitelist = { "127.0.0.1", "localhost" -} \ No newline at end of file +} diff --git a/src/interaction/keybindingmanager_lua.inl b/src/interaction/keybindingmanager_lua.inl index 7d6147694d..0e713cd272 100644 --- a/src/interaction/keybindingmanager_lua.inl +++ b/src/interaction/keybindingmanager_lua.inl @@ -37,7 +37,7 @@ namespace openspace::luascriptfunctions { int bindKey(lua_State* L) { using ghoul::lua::luaTypeToString; - int nArguments = ghoul::lua::checkArgumentsAndThrow(L, {2, 5}, "lua::bindKey"); + int nArguments = ghoul::lua::checkArgumentsAndThrow(L, { 2, 5 }, "lua::bindKey"); const std::string& key = ghoul::lua::value(L, 1); const std::string& command = ghoul::lua::value(L, 2); @@ -82,7 +82,7 @@ int bindKey(lua_State* L) { int bindKeyLocal(lua_State* L) { using ghoul::lua::luaTypeToString; - int nArguments = ghoul::lua::checkArgumentsAndThrow(L, {2, 5}, "lua::bindKeyLocal"); + int nArguments = ghoul::lua::checkArgumentsAndThrow(L, { 2, 5 }, "lua::bindKeyLocal"); const std::string& key = ghoul::lua::value(L, 1); const std::string& command = ghoul::lua::value(L, 2); @@ -100,8 +100,12 @@ int bindKeyLocal(lua_State* L) { } std::string doc = nArguments >= 3 ? ghoul::lua::value(L, 3) : ""; - std::string name = ((nArguments >= 4) && (L, 4)) ? ghoul::lua::value(L, 4) : ""; - std::string guiPath = ((nArguments == 5) && (L, 5)) ? ghoul::lua::value(L, 5) : ""; + std::string name = (nArguments >= 4) ? + ghoul::lua::value(L, 4) : + ""; + std::string guiPath = (nArguments == 5) ? + ghoul::lua::value(L, 5) : + ""; global::keybindingManager.bindKeyLocal( iKey.key, diff --git a/src/interaction/navigationhandler.cpp b/src/interaction/navigationhandler.cpp index fd6892731a..be2465ae7c 100644 --- a/src/interaction/navigationhandler.cpp +++ b/src/interaction/navigationhandler.cpp @@ -123,7 +123,6 @@ void NavigationHandler::setCamera(Camera* camera) { } void NavigationHandler::resetCameraDirection() { - LINFO("Setting camera direction to point at focus node."); _orbitalNavigator->startInterpolateCameraDirection(*_camera); } diff --git a/src/interaction/shortcutmanager_lua.inl b/src/interaction/shortcutmanager_lua.inl index 1d1822c137..3cefd3a80a 100644 --- a/src/interaction/shortcutmanager_lua.inl +++ b/src/interaction/shortcutmanager_lua.inl @@ -57,7 +57,7 @@ int clearShortcuts(lua_State* L) { } int bindShortcut(lua_State* L) { - int n = ghoul::lua::checkArgumentsAndThrow(L, {2, 4}, "lua::bindKeyLocal"); + int n = ghoul::lua::checkArgumentsAndThrow(L, { 2, 4 }, "lua::bindShortcut"); interaction::ShortcutManager::ShortcutInformation info = extractInfo(L, n, true); global::shortcutManager.addShortcut(std::move(info)); @@ -67,7 +67,7 @@ int bindShortcut(lua_State* L) { } int bindShortcutLocal(lua_State* L) { - int n = ghoul::lua::checkArgumentsAndThrow(L, {2, 4}, "lua::bindKeyLocal"); + int n = ghoul::lua::checkArgumentsAndThrow(L, { 2, 4 }, "lua::bindShortcutLocal"); interaction::ShortcutManager::ShortcutInformation info = extractInfo(L, n, false); global::shortcutManager.addShortcut(std::move(info)); diff --git a/src/util/spicemanager.cpp b/src/util/spicemanager.cpp index 2ddb2eba66..ef9a236417 100644 --- a/src/util/spicemanager.cpp +++ b/src/util/spicemanager.cpp @@ -91,8 +91,8 @@ namespace openspace { SpiceManager* SpiceManager::_instance = nullptr; -SpiceManager::SpiceException::SpiceException(const std::string& msg) - : ghoul::RuntimeError(msg, "Spice") +SpiceManager::SpiceException::SpiceException(std::string msg) + : ghoul::RuntimeError(std::move(msg), "Spice") { ghoul_assert( SpiceManager::ref().exceptionHandling() == SpiceManager::UseException::Yes,