Skip to content

Commit

Permalink
[GRASS] no icon module fix
Browse files Browse the repository at this point in the history
  • Loading branch information
blazek committed Oct 19, 2015
1 parent 75c7bfe commit 330d024
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/plugins/grass/qgsgrassmodule.cpp
Expand Up @@ -352,7 +352,7 @@ QPixmap QgsGrassModule::pixmap( QString path, int height )
{
//QgsDebugMsg( QString( "path = %1" ).arg( path ) );

std::vector<QPixmap> pixmaps;
QList<QPixmap> pixmaps;

// Create vector of available pictures
int cnt = 1;
Expand Down Expand Up @@ -383,7 +383,7 @@ QPixmap QgsGrassModule::pixmap( QString path, int height )
pic.render( &painter );
painter.end();

pixmaps.push_back( pixmap );
pixmaps << pixmap;
}
else // PNG
{
Expand All @@ -410,9 +410,14 @@ QPixmap QgsGrassModule::pixmap( QString path, int height )
cnt++;
}

if ( pixmaps.isEmpty() )
{
return QPixmap();
}

// Get total width
int width = 0;
for ( unsigned int i = 0; i < pixmaps.size(); i++ )
for ( int i = 0; i < pixmaps.size(); i++ )
{
width += pixmaps[i].width();
}
Expand Down Expand Up @@ -514,7 +519,7 @@ QPixmap QgsGrassModule::pixmap( QString path, int height )
painter.setRenderHint( QPainter::Antialiasing );

int pos = 0;
for ( unsigned int i = 0; i < pixmaps.size(); i++ )
for ( int i = 0; i < pixmaps.size(); i++ )
{
if ( i == 1 && pixmaps.size() == 3 ) // +
{
Expand Down

0 comments on commit 330d024

Please sign in to comment.