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 committed Jul 16, 2014
1 parent 43635e7 commit 18a1c8a
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

1 comment on commit 18a1c8a

@gioman
Copy link
Contributor

@gioman gioman commented on 18a1c8a Jul 17, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backporting possible?

Please sign in to comment.