Skip to content

Commit

Permalink
Address reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
NEDJIMAbelgacem authored and wonder-sk committed Dec 7, 2020
1 parent d898dcd commit 84108f8
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/3d/shaders/pointcloud.frag
Expand Up @@ -48,7 +48,7 @@ vec4 linearColorRamp()
}
}

//last color if no value is found
//last color if no value is found
vec4 colorRampLine=texelFetch(u_colorRampTexture,colorRampSize-1,0);
return vec4( colorRampLine.yzw, 1.0f );
}
Expand Down
1 change: 0 additions & 1 deletion src/3d/symbols/qgspointcloud3dsymbol.cpp
Expand Up @@ -475,7 +475,6 @@ QgsColorRampShader QgsClassificationPointCloud3DSymbol::colorRampShader() const
for ( const QgsPointCloudCategory &category : mCategoriesList )
{
QColor color = category.color();
color.setAlphaF( category.renderState() ? 1.0f : 0.0f );
QgsColorRampShader::ColorRampItem item( category.value(), color, category.label() );
colorRampItemList.push_back( item );
}
Expand Down
12 changes: 6 additions & 6 deletions src/app/3d/qgspointcloud3dsymbolwidget.cpp
Expand Up @@ -103,9 +103,9 @@ QgsPointCloud3DSymbolWidget::QgsPointCloud3DSymbolWidget( QgsPointCloudLayer *la

rampAttributeChanged();

mClassifiedRenderer = new QgsPointCloudClassifiedRendererWidget( layer, nullptr );
mClassifiedRenderer->setParent( this );
mClassifiedRenderingLayout->addWidget( mClassifiedRenderer );
mClassifiedRendererWidget = new QgsPointCloudClassifiedRendererWidget( layer, nullptr );
mClassifiedRendererWidget->setParent( this );
mClassifiedRenderingLayout->addWidget( mClassifiedRendererWidget );
}

void QgsPointCloud3DSymbolWidget::setSymbol( QgsPointCloud3DSymbol *symbol )
Expand Down Expand Up @@ -160,7 +160,7 @@ void QgsPointCloud3DSymbolWidget::setSymbol( QgsPointCloud3DSymbol *symbol )
{
mStackedWidget->setCurrentIndex( 4 );
QgsClassificationPointCloud3DSymbol *symb = dynamic_cast<QgsClassificationPointCloud3DSymbol *>( symbol );
mClassifiedRenderer->setFromCategories( symb->categoriesList(), symb->renderingParameter() );
mClassifiedRendererWidget->setFromCategories( symb->categoriesList(), symb->renderingParameter() );
}
else
{
Expand Down Expand Up @@ -208,8 +208,8 @@ QgsPointCloud3DSymbol *QgsPointCloud3DSymbolWidget::symbol() const
QgsClassificationPointCloud3DSymbol *symb = new QgsClassificationPointCloud3DSymbol;
symb->setPointSize( mPointSizeSpinBox->value() );

symb->setRenderingParameter( mClassifiedRenderer->attribute() );
symb->setCategoriesList( mClassifiedRenderer->categoriesList() );
symb->setRenderingParameter( mClassifiedRendererWidget->attribute() );
symb->setCategoriesList( mClassifiedRendererWidget->categoriesList() );
retSymb = symb;
}

Expand Down
2 changes: 1 addition & 1 deletion src/app/3d/qgspointcloud3dsymbolwidget.h
Expand Up @@ -65,7 +65,7 @@ class QgsPointCloud3DSymbolWidget : public QWidget, private Ui::QgsPointCloud3DS
private:
int mBlockChangedSignals = 0;
int mDisableMinMaxWidgetRefresh = 0;
QgsPointCloudClassifiedRendererWidget *mClassifiedRenderer = nullptr;
QgsPointCloudClassifiedRendererWidget *mClassifiedRendererWidget = nullptr;
QgsPointCloudLayer *mLayer = nullptr;

bool mBlockMinMaxChanged = false;
Expand Down

0 comments on commit 84108f8

Please sign in to comment.