Skip to content
Permalink
Browse files

Move "add 3D map" button just after "add map" button

  • Loading branch information
wonder-sk committed Aug 25, 2018
1 parent 7bdcab6 commit d9f67f8816918e3bba5f0536707d02817ce70c76
Showing with 10 additions and 11 deletions.
  1. +10 −11 src/app/layout/qgslayoutapputils.cpp
@@ -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

@@ -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.
You can’t perform that action at this time.