Skip to content
Permalink
Browse files
Select a valid variant when there's no variant with the same number o…
…f colors in new scheme. Fixes #2254

git-svn-id: http://svn.osgeo.org/qgis/trunk@12511 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Dec 19, 2009
1 parent ccc5471 commit bed548d
Showing 1 changed file with 7 additions and 1 deletion.
@@ -59,7 +59,13 @@ void QgsVectorColorBrewerColorRampV2Dialog::populateVariants()
}

// try to set the original variant again (if exists)
cboColors->setCurrentIndex( cboColors->findText( oldVariant ) );
int idx = cboColors->findText( oldVariant );
if ( idx == -1 ) // not found?
{
// use the last item
idx = cboColors->count() - 1;
}
cboColors->setCurrentIndex( idx );
}

void QgsVectorColorBrewerColorRampV2Dialog::updatePreview()

0 comments on commit bed548d

Please sign in to comment.