diff options
author | Georg Zotti <Georg.Zotti@univie.ac.at> | 2024-03-03 15:16:25 +0100 |
---|---|---|
committer | Georg Zotti <Georg.Zotti@univie.ac.at> | 2024-03-03 15:20:42 +0100 |
commit | 94d8e1595d246f92fc6c40e007e197ba9c77f068 (patch) | |
tree | 2c0cf2faa81d226339e30d1ecd4ed6e43cfef9f1 | |
parent | 06d9f6f61f0e112d6501afad66e096a721c27fca (diff) |
Fix landscape transparency issue (Fix #3512)
- a wrong signal was triggered
-rw-r--r-- | src/core/modules/LandscapeMgr.cpp | 10 | ||||
-rw-r--r-- | src/core/modules/LandscapeMgr.hpp | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/core/modules/LandscapeMgr.cpp b/src/core/modules/LandscapeMgr.cpp index 98e0e7b581..321bdedb95 100644 --- a/src/core/modules/LandscapeMgr.cpp +++ b/src/core/modules/LandscapeMgr.cpp @@ -647,10 +647,7 @@ void LandscapeMgr::update(double deltaTime) // If we have no atmosphere, we can assume windows and panels on spaceships etc. are switched on whenever the sun does not shine, i.e. when sun is blocked by landscape. lightscapeBrightness= static_cast<double>(landscape->getOpacity(sunPos)); } - landscape->setBrightness(landscapeBrightness, lightscapeBrightness); - if (getFlagLandscapeUseTransparency()) - landscape->setTransparency(landscapeTransparency); messageFader.update(static_cast<int>(deltaTime*1000)); } @@ -680,8 +677,13 @@ void LandscapeMgr::draw(StelCore* core) } // Draw the landscape + landscape->setTransparency( getFlagLandscapeUseTransparency() ? landscapeTransparency : 0.0); + if (oldLandscape) + { + oldLandscape->setTransparency( getFlagLandscapeUseTransparency() ? landscapeTransparency : 0.0); oldLandscape->draw(core, flagPolyLineDisplayedOnly); + } landscape->draw(core, flagPolyLineDisplayedOnly); // Draw the cardinal points @@ -1261,7 +1263,7 @@ bool LandscapeMgr::getFlagIllumination() const void LandscapeMgr::setLandscapeTransparency(const double f) { landscapeTransparency = f; - emit landscapeDisplayedChanged(f); + emit landscapeTransparencyChanged(f); } double LandscapeMgr::getLandscapeTransparency() const diff --git a/src/core/modules/LandscapeMgr.hpp b/src/core/modules/LandscapeMgr.hpp index d18600e3fd..a8c978a2e1 100644 --- a/src/core/modules/LandscapeMgr.hpp +++ b/src/core/modules/LandscapeMgr.hpp @@ -576,8 +576,6 @@ public slots: flagLandscapeUseTransparency=b; emit flagLandscapeUseTransparencyChanged(b); } - if (!flagLandscapeUseTransparency) // equals to false - landscape->setTransparency(0.0); } /* |