Skip to content

Commit

Permalink
Merge pull request #1612 from ccrook/GraduatedRendererBugFixes1
Browse files Browse the repository at this point in the history
Two bug fixes for graduated renderer
  • Loading branch information
NathanW2 committed Oct 5, 2014
2 parents b2e7e6e + 6c2c6e2 commit 66b1f53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion python/core/symbology-ng/qgsgraduatedsymbolrendererv2.sip
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class QgsRendererRangeV2

public:
QgsRendererRangeV2();
QgsRendererRangeV2( double lowerValue, double upperValue, QgsSymbolV2* symbol, QString label, bool render = true );
QgsRendererRangeV2( double lowerValue, double upperValue, QgsSymbolV2* symbol /Transfer/, QString label, bool render = true );
QgsRendererRangeV2( const QgsRendererRangeV2& range );

// default dtor is ok
Expand Down
3 changes: 2 additions & 1 deletion src/gui/symbology-ng/qgsgraduatedsymbolrendererv2widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ QgsGraduatedSymbolRendererV2Widget::QgsGraduatedSymbolRendererV2Widget( QgsVecto
, mModel( 0 )
{


// try to recognize the previous renderer
// (null renderer means "no previous renderer")
if ( renderer )
Expand All @@ -391,6 +392,7 @@ QgsGraduatedSymbolRendererV2Widget::QgsGraduatedSymbolRendererV2Widget( QgsVecto

// setup user interface
setupUi( this );
mModel = new QgsGraduatedSymbolRendererV2Model( this );

mExpressionWidget->setFilters( QgsFieldProxyModel::Numeric | QgsFieldProxyModel::Date );
mExpressionWidget->setLayer( mLayer );
Expand Down Expand Up @@ -526,7 +528,6 @@ void QgsGraduatedSymbolRendererV2Widget::updateUiFromRenderer( bool updateCount
spinPrecision->setValue( labelFormat.precision() );
cbxTrimTrailingZeroes->setChecked( labelFormat.trimTrailingZeroes() );

mModel = new QgsGraduatedSymbolRendererV2Model( this );
mModel->setRenderer( mRenderer );
viewGraduated->setModel( mModel );
viewGraduated->resizeColumnToContents( 0 );
Expand Down

0 comments on commit 66b1f53

Please sign in to comment.