Skip to content

Commit

Permalink
Move "add 3D map" button just after "add map" button
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk committed Aug 25, 2018
1 parent 7bdcab6 commit d9f67f8
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/app/layout/qgslayoutapputils.cpp
Expand Up @@ -96,6 +96,16 @@ void QgsLayoutAppUtils::registerGuiForKnownItemTypes()
} );
registry->addLayoutItemGuiMetadata( mapItemMetadata.release() );

// 3D map item
#ifdef HAVE_3D
std::unique_ptr< QgsLayoutItemGuiMetadata > map3dMetadata = qgis::make_unique< QgsLayoutItemGuiMetadata>(
QgsLayoutItemRegistry::Layout3DMap, QObject::tr( "3D Map" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAdd3DMap.svg" ) ),
[ = ]( QgsLayoutItem * item )->QgsLayoutItemBaseWidget *
{
return new QgsLayout3DMapWidget( qobject_cast< QgsLayoutItem3DMap * >( item ) );
}, createRubberBand );
registry->addLayoutItemGuiMetadata( map3dMetadata.release() );
#endif

// picture item

Expand Down Expand Up @@ -345,15 +355,4 @@ void QgsLayoutAppUtils::registerGuiForKnownItemTypes()
return f;
} );
registry->addLayoutItemGuiMetadata( attributeTableItemMetadata .release() );

// 3D map item
#ifdef HAVE_3D
std::unique_ptr< QgsLayoutItemGuiMetadata > map3dMetadata = qgis::make_unique< QgsLayoutItemGuiMetadata>(
QgsLayoutItemRegistry::Layout3DMap, QObject::tr( "3D Map" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAdd3DMap.svg" ) ),
[ = ]( QgsLayoutItem * item )->QgsLayoutItemBaseWidget *
{
return new QgsLayout3DMapWidget( qobject_cast< QgsLayoutItem3DMap * >( item ) );
}, createRubberBand );
registry->addLayoutItemGuiMetadata( map3dMetadata.release() );
#endif
}

0 comments on commit d9f67f8

Please sign in to comment.