File tree Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Expand file tree Collapse file tree 1 file changed +11
-15
lines changed Original file line number Diff line number Diff line change @@ -703,22 +703,18 @@ QList<QgsSymbolV2*> QgsGraduatedSymbolRendererV2Widget::selectedSymbols()
703
703
QModelIndexList::const_iterator indexIt = selectedIndexes.constBegin ();
704
704
for ( ; indexIt != selectedIndexes.constEnd (); ++indexIt )
705
705
{
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 )
708
708
{
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 );
722
718
}
723
719
}
724
720
}
You can’t perform that action at this time.
0 commit comments