Skip to content

Commit

Permalink
fix #6817 (introduce with a1a1fb7)
Browse files Browse the repository at this point in the history
  • Loading branch information
brushtyler committed Dec 6, 2012
1 parent 6ed8a23 commit 80319e3
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,22 +703,18 @@ QList<QgsSymbolV2*> QgsGraduatedSymbolRendererV2Widget::selectedSymbols()
QModelIndexList::const_iterator indexIt = selectedIndexes.constBegin();
for ( ; indexIt != selectedIndexes.constEnd(); ++indexIt )
{
QStandardItem* currentItem = qobject_cast<const QStandardItemModel*>( m->model() )->itemFromIndex( *indexIt );
if ( currentItem )
QStringList list = m->model()->data( *indexIt ).toString().split( " " );
if ( list.size() < 3 )
{
QStringList list = currentItem->data( 0 ).toString().split( " " );
if ( list.size() < 3 )
{
continue;
}

double lowerBound = list.at( 0 ).toDouble();
double upperBound = list.at( 2 ).toDouble();
QgsSymbolV2* s = findSymbolForRange( lowerBound, upperBound, ranges );
if ( s )
{
selectedSymbols.append( s );
}
continue;
}

double lowerBound = list.at( 0 ).toDouble();
double upperBound = list.at( 2 ).toDouble();
QgsSymbolV2* s = findSymbolForRange( lowerBound, upperBound, ranges );
if ( s )
{
selectedSymbols.append( s );
}
}
}
Expand Down

0 comments on commit 80319e3

Please sign in to comment.