Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Revert some changes in qgslayerstylingwidget.cpp
  • Loading branch information
NEDJIMAbelgacem committed Nov 17, 2020
1 parent 73c1601 commit 93d896e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 38 deletions.
5 changes: 5 additions & 0 deletions src/app/3d/qgspointcloudlayer3drendererwidget.cpp
Expand Up @@ -126,3 +126,8 @@ QString QgsPointCloudLayer3DRendererWidgetFactory::layerPropertiesPagePositionHi
{
return QStringLiteral( "mOptsPage_Rendering" );
}

bool QgsPointCloudLayer3DRendererWidgetFactory::supportsStyleDock() const
{
return true;
}
1 change: 1 addition & 0 deletions src/app/3d/qgspointcloudlayer3drendererwidget.h
Expand Up @@ -64,6 +64,7 @@ class QgsPointCloudLayer3DRendererWidgetFactory : public QObject, public QgsMapL
bool supportLayerPropertiesDialog() const override;
bool supportsLayer( QgsMapLayer *layer ) const override;
QString layerPropertiesPagePositionHint() const override;
bool supportsStyleDock() const override;
};

#endif // QGSPOINTCLOUDLAYER3DRENDERERWIDGET_H
37 changes: 0 additions & 37 deletions src/app/qgslayerstylingwidget.cpp
Expand Up @@ -57,7 +57,6 @@
#ifdef HAVE_3D
#include "qgsvectorlayer3drendererwidget.h"
#include "qgsmeshlayer3drendererwidget.h"
#include "qgspointcloudlayer3drendererwidget.h"
#endif


Expand Down Expand Up @@ -255,16 +254,6 @@ void QgsLayerStylingWidget::setLayer( QgsMapLayer *layer )
}

case QgsMapLayerType::PointCloudLayer:
{
#ifdef HAVE_3D
QListWidgetItem *symbol3DItem = new QListWidgetItem( QgsApplication::getThemeIcon( QStringLiteral( "3d.svg" ) ), QString() );
symbol3DItem->setData( Qt::UserRole, Symbology3D );
symbol3DItem->setToolTip( tr( "3D View" ) );
mOptionsListWidget->addItem( symbol3DItem );
#endif
break;
}

case QgsMapLayerType::PluginLayer:
case QgsMapLayerType::AnnotationLayer:
break;
Expand Down Expand Up @@ -438,10 +427,6 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
{
mMesh3DWidget = widget;
}
else if ( QgsPointCloudLayer3DRendererWidget *widget = qobject_cast<QgsPointCloudLayer3DRendererWidget *>( current ) )
{
mPointCloud3DWidget = widget;
}
#endif
}

Expand Down Expand Up @@ -673,28 +658,6 @@ void QgsLayerStylingWidget::updateCurrentWidgetLayer()
}

case QgsMapLayerType::PointCloudLayer:
{
QgsPointCloudLayer *pcLayer = qobject_cast<QgsPointCloudLayer *>( mCurrentLayer );
switch ( row )
{
case 0:
{
#ifdef HAVE_3D
if ( !mPointCloud3DWidget )
{
mPointCloud3DWidget = new QgsPointCloudLayer3DRendererWidget( pcLayer, mMapCanvas, mWidgetStack );
mPointCloud3DWidget->setDockMode( true );
connect( mPointCloud3DWidget, &QgsPointCloudLayer3DRendererWidget::widgetChanged, this, &QgsLayerStylingWidget::autoApply );
}
mPointCloud3DWidget->syncToLayer( pcLayer );
mWidgetStack->setMainPanel( mPointCloud3DWidget );
#endif
break;
}
}
break;
}

case QgsMapLayerType::PluginLayer:
case QgsMapLayerType::AnnotationLayer:
{
Expand Down
1 change: 0 additions & 1 deletion src/app/qgslayerstylingwidget.h
Expand Up @@ -149,7 +149,6 @@ class APP_EXPORT QgsLayerStylingWidget : public QWidget, private Ui::QgsLayerSty
#ifdef HAVE_3D
QgsVectorLayer3DRendererWidget *mVector3DWidget = nullptr;
QgsMeshLayer3DRendererWidget *mMesh3DWidget = nullptr;
QgsPointCloudLayer3DRendererWidget *mPointCloud3DWidget = nullptr;
#endif
QgsRendererRasterPropertiesWidget *mRasterStyleWidget = nullptr;
QgsRendererMeshPropertiesWidget *mMeshStyleWidget = nullptr;
Expand Down

0 comments on commit 93d896e

Please sign in to comment.