Skip to content

Commit

Permalink
Fix crash in 3d when changing symbol properties (3.14 backport)
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Aug 27, 2020
1 parent 0f7e575 commit 41e0ec1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/3d/symbols/qgsline3dsymbol_p.cpp
Expand Up @@ -74,7 +74,7 @@ class QgsBufferedLine3DSymbolHandler : public QgsFeature3DHandler
void makeEntity( Qt3DCore::QEntity *parent, const Qgs3DRenderContext &context, LineData &out, bool selected );

// input specific for this class
const QgsLine3DSymbol &mSymbol;
QgsLine3DSymbol mSymbol;
// inputs - generic
QgsFeatureIds mSelectedIds;

Expand Down Expand Up @@ -200,7 +200,7 @@ class QgsSimpleLine3DSymbolHandler : public QgsFeature3DHandler
Qt3DExtras::QPhongMaterial *material( const QgsLine3DSymbol &symbol ) const;

// input specific for this class
const QgsLine3DSymbol &mSymbol;
QgsLine3DSymbol mSymbol;
// inputs - generic
QgsFeatureIds mSelectedIds;

Expand Down Expand Up @@ -310,7 +310,7 @@ class QgsThickLine3DSymbolHandler : public QgsFeature3DHandler
Qt3DExtras::QPhongMaterial *material( const QgsLine3DSymbol &symbol ) const;

// input specific for this class
const QgsLine3DSymbol &mSymbol;
QgsLine3DSymbol mSymbol;
// inputs - generic
QgsFeatureIds mSelectedIds;

Expand Down
9 changes: 6 additions & 3 deletions src/3d/symbols/qgspoint3dsymbol_p.cpp
Expand Up @@ -85,7 +85,7 @@ class QgsInstancedPoint3DSymbolHandler : public QgsFeature3DHandler
void makeEntity( Qt3DCore::QEntity *parent, const Qgs3DRenderContext &context, PointData &out, bool selected );

// input specific for this class
const QgsPoint3DSymbol &mSymbol;
QgsPoint3DSymbol mSymbol;
// inputs - generic
QgsFeatureIds mSelectedIds;

Expand Down Expand Up @@ -358,7 +358,7 @@ class QgsModelPoint3DSymbolHandler : public QgsFeature3DHandler
void makeEntity( Qt3DCore::QEntity *parent, const Qgs3DRenderContext &context, PointData &out, bool selected );

// input specific for this class
const QgsPoint3DSymbol &mSymbol;
QgsPoint3DSymbol mSymbol;
// inputs - generic
QgsFeatureIds mSelectedIds;

Expand Down Expand Up @@ -431,6 +431,9 @@ void QgsModelPoint3DSymbolHandler::addSceneEntities( const Qgs3DMapSettings &map

void QgsModelPoint3DSymbolHandler::addMeshEntities( const Qgs3DMapSettings &map, const QVector<QVector3D> &positions, const QgsPoint3DSymbol &symbol, Qt3DCore::QEntity *parent, bool are_selected )
{
if ( positions.empty() )
return;

// build the default material
Qt3DExtras::QPhongMaterial *mat = Qgs3DUtils::phongMaterial( symbol.material() );

Expand Down Expand Up @@ -490,7 +493,7 @@ class QgsPoint3DBillboardSymbolHandler : public QgsFeature3DHandler
void makeEntity( Qt3DCore::QEntity *parent, const Qgs3DRenderContext &context, PointData &out, bool selected );

// input specific for this class
const QgsPoint3DSymbol &mSymbol;
QgsPoint3DSymbol mSymbol;
// inputs - generic
QgsFeatureIds mSelectedIds;

Expand Down
2 changes: 1 addition & 1 deletion src/3d/symbols/qgspolygon3dsymbol_p.cpp
Expand Up @@ -62,7 +62,7 @@ class QgsPolygon3DSymbolHandler : public QgsFeature3DHandler
Qt3DExtras::QPhongMaterial *material( const QgsPolygon3DSymbol &symbol ) const;

// input specific for this class
const QgsPolygon3DSymbol &mSymbol;
QgsPolygon3DSymbol mSymbol;
// inputs - generic
QgsFeatureIds mSelectedIds;

Expand Down

0 comments on commit 41e0ec1

Please sign in to comment.