Skip to content

Commit d9f67f8

Browse files
committed
Move "add 3D map" button just after "add map" button
1 parent 7bdcab6 commit d9f67f8

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/app/layout/qgslayoutapputils.cpp

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,16 @@ void QgsLayoutAppUtils::registerGuiForKnownItemTypes()
9696
} );
9797
registry->addLayoutItemGuiMetadata( mapItemMetadata.release() );
9898

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

100110
// picture item
101111

@@ -345,15 +355,4 @@ void QgsLayoutAppUtils::registerGuiForKnownItemTypes()
345355
return f;
346356
} );
347357
registry->addLayoutItemGuiMetadata( attributeTableItemMetadata .release() );
348-
349-
// 3D map item
350-
#ifdef HAVE_3D
351-
std::unique_ptr< QgsLayoutItemGuiMetadata > map3dMetadata = qgis::make_unique< QgsLayoutItemGuiMetadata>(
352-
QgsLayoutItemRegistry::Layout3DMap, QObject::tr( "3D Map" ), QgsApplication::getThemeIcon( QStringLiteral( "/mActionAdd3DMap.svg" ) ),
353-
[ = ]( QgsLayoutItem * item )->QgsLayoutItemBaseWidget *
354-
{
355-
return new QgsLayout3DMapWidget( qobject_cast< QgsLayoutItem3DMap * >( item ) );
356-
}, createRubberBand );
357-
registry->addLayoutItemGuiMetadata( map3dMetadata.release() );
358-
#endif
359358
}

0 commit comments

Comments
 (0)