Skip to content

Commit 80319e3

Browse files
committedDec 6, 2012
fix #6817 (introduce with a1a1fb7)
1 parent 6ed8a23 commit 80319e3

File tree

1 file changed

+11
-15
lines changed

1 file changed

+11
-15
lines changed
 

‎src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -703,22 +703,18 @@ QList<QgsSymbolV2*> QgsGraduatedSymbolRendererV2Widget::selectedSymbols()
703703
QModelIndexList::const_iterator indexIt = selectedIndexes.constBegin();
704704
for ( ; indexIt != selectedIndexes.constEnd(); ++indexIt )
705705
{
706-
QStandardItem* currentItem = qobject_cast<const QStandardItemModel*>( m->model() )->itemFromIndex( *indexIt );
707-
if ( currentItem )
706+
QStringList list = m->model()->data( *indexIt ).toString().split( " " );
707+
if ( list.size() < 3 )
708708
{
709-
QStringList list = currentItem->data( 0 ).toString().split( " " );
710-
if ( list.size() < 3 )
711-
{
712-
continue;
713-
}
714-
715-
double lowerBound = list.at( 0 ).toDouble();
716-
double upperBound = list.at( 2 ).toDouble();
717-
QgsSymbolV2* s = findSymbolForRange( lowerBound, upperBound, ranges );
718-
if ( s )
719-
{
720-
selectedSymbols.append( s );
721-
}
709+
continue;
710+
}
711+
712+
double lowerBound = list.at( 0 ).toDouble();
713+
double upperBound = list.at( 2 ).toDouble();
714+
QgsSymbolV2* s = findSymbolForRange( lowerBound, upperBound, ranges );
715+
if ( s )
716+
{
717+
selectedSymbols.append( s );
722718
}
723719
}
724720
}

0 commit comments

Comments
 (0)
Please sign in to comment.