Skip to content

Commit 7363276

Browse files
committedApr 23, 2019
[3d] Fix edge drawing when multiple renderer rules have edges enabled
When using rule-based 3D rendering, if multiple rules were enabled with edge rendering, only the first rule was getting correctly set up line width for line material. (the rest were getting some very thick line width and making the 3D view unusable)
1 parent 9421d60 commit 7363276

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed
 

‎src/3d/qgs3dmapscene.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,7 @@ void Qgs3DMapScene::addLayerEntity( QgsMapLayer *layer )
575575

576576
// this is probably not the best place for material-specific configuration,
577577
// maybe this could be more generalized when other materials need some specific treatment
578-
QgsLineMaterial *lm = newEntity->findChild<QgsLineMaterial *>();
579-
if ( lm )
578+
for ( QgsLineMaterial *lm : newEntity->findChildren<QgsLineMaterial *>() )
580579
{
581580
connect( mCameraController, &QgsCameraController::viewportChanged, lm, [lm, this]
582581
{

1 commit comments

Comments
 (1)

nirvn commented on Apr 24, 2019

@nirvn
Contributor

@wonder-sk , working like a charm, cheers.

Please sign in to comment.