Skip to content
Permalink
Browse files

[GRASS] no icon module fix

  • Loading branch information
blazek committed Oct 19, 2015
1 parent 75c7bfe commit 330d02447686a58770addd73dd4a0bb80724bdef
Showing with 9 additions and 4 deletions.
  1. +9 −4 src/plugins/grass/qgsgrassmodule.cpp
@@ -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;
@@ -383,7 +383,7 @@ QPixmap QgsGrassModule::pixmap( QString path, int height )
pic.render( &painter );
painter.end();

pixmaps.push_back( pixmap );
pixmaps << pixmap;
}
else // PNG
{
@@ -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();
}
@@ -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 ) // +
{

0 comments on commit 330d024

Please sign in to comment.
You can’t perform that action at this time.