Skip to content

Commit

Permalink
Fix #10828 (slow project loading)
Browse files Browse the repository at this point in the history
  • Loading branch information
wonder-sk authored and jef-n committed Jul 17, 2014
1 parent e937b62 commit 904443f
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/gui/qgsmaplayermodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

#include <QIcon>

#include "qgsdataitem.h"
#include "qgsmaplayermodel.h"
#include "qgsmaplayerregistry.h"
#include "qgsapplication.h"
Expand Down Expand Up @@ -132,6 +133,7 @@ int QgsMapLayerModel::columnCount( const QModelIndex &parent ) const
return 1;
}


QVariant QgsMapLayerModel::data( const QModelIndex &index, int role ) const
{
if ( !index.isValid() || !index.internalPointer() )
Expand Down Expand Up @@ -165,7 +167,7 @@ QVariant QgsMapLayerModel::data( const QModelIndex &index, int role ) const
{
case QgsMapLayer::RasterLayer:
{
return QgsApplication::getThemeIcon( "/mIconRasterLayer.svg" );
return QgsLayerItem::iconRaster();
}

case QgsMapLayer::VectorLayer:
Expand All @@ -180,19 +182,19 @@ QVariant QgsMapLayerModel::data( const QModelIndex &index, int role ) const
{
case QGis::Point:
{
return QgsApplication::getThemeIcon( "/mIconPointLayer.svg" );
return QgsLayerItem::iconPoint();
}
case QGis::Polygon :
{
return QgsApplication::getThemeIcon( "/mIconPolygonLayer.svg" );
return QgsLayerItem::iconPolygon();
}
case QGis::Line :
{
return QgsApplication::getThemeIcon( "/mIconLineLayer.svg" );
return QgsLayerItem::iconLine();
}
case QGis::NoGeometry :
{
return QgsApplication::getThemeIcon( "/mIconTableLayer.png" );
return QgsLayerItem::iconTable();
}
default:
{
Expand Down

0 comments on commit 904443f

Please sign in to comment.