Disable hover circle per default when setting renderable (fixes #2153)

and throw warning if setting to non-existing node
This commit is contained in:
Emma Broman
2022-06-30 11:57:41 +02:00
committed by GitHub
parent 892e33ed67
commit e44d5e0b39
2 changed files with 9 additions and 0 deletions

View File

@@ -307,6 +307,9 @@ void SkyBrowserModule::lookAtTarget(const std::string& id) {
void SkyBrowserModule::setHoverCircle(SceneGraphNode* circle) {
_hoverCircle = circle;
// Always disable it per default. It should only be visible on interaction
disableHoverCircle();
}
void SkyBrowserModule::moveHoverCircle(int i, bool useScript) {

View File

@@ -87,6 +87,12 @@ namespace {
using namespace openspace;
SceneGraphNode* circle = global::renderEngine->scene()->sceneGraphNode(identifier);
if (!circle) {
throw ghoul::lua::LuaError(fmt::format(
"Could not find node to set as hover circle: '{}'", identifier
));
}
global::moduleEngine->module<SkyBrowserModule>()->setHoverCircle(circle);
}