Skip to content
Permalink
Browse files

[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)
  • Loading branch information
wonder-sk committed Apr 23, 2019
1 parent 9421d60 commit 736327634e56cb0add322f2f47ad27ff3c722e31
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/3d/qgs3dmapscene.cpp
@@ -575,8 +575,7 @@ void Qgs3DMapScene::addLayerEntity( QgsMapLayer *layer )

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

1 comment on commit 7363276

@nirvn

This comment has been minimized.

Copy link
Contributor

@nirvn nirvn commented on 7363276 Apr 24, 2019

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

Please sign in to comment.
You can’t perform that action at this time.