make snapping type translatable in model (fixes #20437)

This commit is contained in:
Juergen E. Fischer 2018-11-10 14:15:47 +01:00
parent 005a7fa43f
commit 84814c9124

View File

@ -40,9 +40,9 @@ QWidget *QgsSnappingLayerDelegate::createEditor( QWidget *parent, const QStyleOp
if ( index.column() == QgsSnappingLayerTreeModel::TypeColumn )
{
QComboBox *w = new QComboBox( parent );
w->addItem( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingVertex.svg" ) ), QStringLiteral( "Vertex" ), QgsSnappingConfig::Vertex );
w->addItem( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingVertexAndSegment.svg" ) ), QStringLiteral( "Vertex and segment" ), QgsSnappingConfig::VertexAndSegment );
w->addItem( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingSegment.svg" ) ), QStringLiteral( "Segment" ), QgsSnappingConfig::Segment );
w->addItem( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingVertex.svg" ) ), tr( "vertex" ), QgsSnappingConfig::Vertex );
w->addItem( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingVertexAndSegment.svg" ) ), tr( "vertex and segment" ), QgsSnappingConfig::VertexAndSegment );
w->addItem( QIcon( QgsApplication::getThemeIcon( "/mIconSnappingSegment.svg" ) ), tr( "segment" ), QgsSnappingConfig::Segment );
return w;
}