Skip to content

Commit 7547edc

Browse files
committed
Fix logic of survey/model choice
Before this patch a model would be shown at the same time as a survey, which would result in ugly overlapping and generally not make sense.
1 parent 66c7d87 commit 7547edc

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

src/core/modules/Planet.cpp

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4563,16 +4563,13 @@ void Planet::draw3dModel(StelCore* core, StelProjector::ModelViewTranformP trans
45634563
sPainter.setColor(overbright, powf(0.75f, extinctedMag)*overbright, powf(0.42f, 0.9f*extinctedMag)*overbright);
45644564
}
45654565

4566-
if(ssm->getFlagUseObjModels() && (!objModelPath.isEmpty() || isMoon))
4566+
if (!survey || survey.colors->getInterstate() < 1.0f)
45674567
{
4568-
if(!drawObjModel(light, &sPainter, isMoon, screenRd))
4569-
{
4568+
bool drawingModel = ssm->getFlagUseObjModels() && (!objModelPath.isEmpty() || isMoon);
4569+
if (drawingModel)
4570+
drawingModel = drawObjModel(light, &sPainter, isMoon, screenRd);
4571+
if (!drawingModel)
45704572
drawSphere(light, &sPainter, screenRd, drawOnlyRing);
4571-
}
4572-
}
4573-
else if (!survey || survey.colors->getInterstate() < 1.0f)
4574-
{
4575-
drawSphere(light, &sPainter, screenRd, drawOnlyRing);
45764573
}
45774574

45784575
if (survey && survey.colors->getInterstate() > 0.0f)

0 commit comments

Comments
 (0)