Skip to content
Permalink
Browse files
Merge pull request #1630 from ccrook/GraduatedRendererUnitTests2
Graduated renderer unit tests2
  • Loading branch information
ccrook committed Oct 19, 2014
2 parents 7798bd8 + 359a3d8 commit 422ea56f5b00fbe7360f1f47d33283fbef7fba8f
Showing with 501 additions and 1 deletion.
  1. +2 −1 src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
  2. +1 −0 tests/src/python/CMakeLists.txt
  3. +498 −0 tests/src/python/test_qgsgraduatedsymbolrendererv2.py
@@ -1113,10 +1113,11 @@ QgsFeatureRendererV2* QgsGraduatedSymbolRendererV2::create( QDomElement& element
double upperValue = rangeElem.attribute( "upper" ).toDouble();
QString symbolName = rangeElem.attribute( "symbol" );
QString label = rangeElem.attribute( "label" );
bool render=rangeElem.attribute("render","true") != "false";
if ( symbolMap.contains( symbolName ) )
{
QgsSymbolV2* symbol = symbolMap.take( symbolName );
ranges.append( QgsRendererRangeV2( lowerValue, upperValue, symbol, label ) );
ranges.append( QgsRendererRangeV2( lowerValue, upperValue, symbol, label, render ) );
}
}
rangeElem = rangeElem.nextSiblingElement();
@@ -40,3 +40,4 @@ ADD_PYTHON_TEST(PyQgsSpatialiteProvider test_qgsspatialiteprovider.py)
ADD_PYTHON_TEST(PyQgsZonalStatistics test_qgszonalstatistics.py)
ADD_PYTHON_TEST(PyQgsAppStartup test_qgsappstartup.py)
ADD_PYTHON_TEST(PyQgsDistanceArea test_qgsdistancearea.py)
ADD_PYTHON_TEST(PyQgsGraduatedSymbolRendererV2 test_qgsgraduatedsymbolrendererv2.py)
Loading

0 comments on commit 422ea56

Please sign in to comment.