mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-03-09 23:08:49 -05:00
Disable hover circle per default when setting renderable (fixes #2153)
and throw warning if setting to non-existing node
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user