Skip to content

Commit c444331

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 afd18cd commit c444331

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
@@ -4562,16 +4562,13 @@ void Planet::draw3dModel(StelCore* core, StelProjector::ModelViewTranformP trans
45624562
sPainter.setColor(overbright, powf(0.75f, extinctedMag)*overbright, powf(0.42f, 0.9f*extinctedMag)*overbright);
45634563
}
45644564

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

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

0 commit comments

Comments
 (0)