Skip to content
Permalink
Browse files

Move initialization to Qgs3DAppUtils

  • Loading branch information
nyalldawson committed Jul 29, 2020
1 parent 1484a30 commit 40f21abf7a582f5fc484c5273b62b1d68aab21bf
Showing with 3 additions and 2 deletions.
  1. +3 −0 src/app/3d/qgs3dapputils.cpp
  2. +0 −2 src/app/qgisapp.cpp
@@ -22,6 +22,7 @@
#include "qgspolygon3dsymbolwidget.h"
#include "qgsline3dsymbolwidget.h"
#include "qgsphongmaterialwidget.h"
#include "qgs3dicongenerator.h"

void Qgs3DAppUtils::initialize()
{
@@ -30,4 +31,6 @@ void Qgs3DAppUtils::initialize()
dynamic_cast< Qgs3DSymbolMetadata * >( QgsApplication::symbol3DRegistry()->symbolMetadata( QStringLiteral( "polygon" ) ) )->setWidgetFunction( QgsPolygon3DSymbolWidget::create );

dynamic_cast< QgsMaterialSettingsMetadata * >( Qgs3D::materialRegistry()->materialSettingsMetadata( QStringLiteral( "phong" ) ) )->setWidgetFunction( QgsPhongMaterialWidget::create );

QgsStyleModel::setIconGenerator( new Qgs3DIconGenerator( QgsApplication::defaultStyleModel() ) );
}
@@ -12657,8 +12657,6 @@ void QgisApp::init3D()
// initialize 3D registries
Qgs3D::initialize();
Qgs3DAppUtils::initialize();

QgsStyleModel::setIconGenerator( new Qgs3DIconGenerator( QgsApplication::defaultStyleModel() ) );
#else
mActionNew3DMapCanvas->setVisible( false );
#endif

0 comments on commit 40f21ab

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