Skip to content

Commit

Permalink
fixup 4867b7f
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 4, 2014
1 parent 4867b7f commit c5340cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/core/composer/qgslegendmodel.h
Expand Up @@ -65,6 +65,7 @@ class CORE_EXPORT QgsLegendModel : public QStandardItemModel
/**Adds a group
@param text name of group (defaults to translation of "Group")
@param position insertion position (toplevel position (or -1 if it should be placed at the end of the legend).
@param parentItem parent item
@returns a pointer to the added group
*/
QStandardItem *addGroup( QString text = QString::null, int position = -1, QStandardItem* parentItem = 0 );
Expand Down
1 change: 1 addition & 0 deletions src/core/symbology-ng/qgsrendererv2.cpp
Expand Up @@ -520,6 +520,7 @@ bool QgsFeatureRendererV2::legendSymbolItemsCheckable() const

bool QgsFeatureRendererV2::legendSymbolItemChecked( QString item )
{
Q_UNUSED( item );
return false;
}

Expand Down
6 changes: 3 additions & 3 deletions src/core/symbology-ng/qgsrendererv2.h
Expand Up @@ -151,15 +151,15 @@ class CORE_EXPORT QgsFeatureRendererV2
virtual QgsLegendSymbologyList legendSymbologyItems( QSize iconSize );

//! items of symbology items in legend should be checkable
//! @node added in 2.5
//! @note added in 2.5
virtual bool legendSymbolItemsCheckable() const;

//! items of symbology items in legend is checked
//! @node added in 2.5
//! @note added in 2.5
virtual bool legendSymbolItemChecked( QString key );

//! item in symbology was checked
//! @node added in 2.5
//! @note added in 2.5
virtual void checkLegendSymbolItem( QString key, bool state = true );

//! return a list of item text / symbol
Expand Down
6 changes: 3 additions & 3 deletions src/gui/symbology-ng/qgscategorizedsymbolrendererv2widget.cpp
Expand Up @@ -608,15 +608,15 @@ static void _createCategories( QgsCategoryList& cats, QList<QVariant>& values, Q
QgsSymbolV2* newSymbol = symbol->clone();
newSymbol->setColor( ramp->color( x ) );

cats.append( QgsRendererCategoryV2( value, newSymbol, value.toString() ) );
cats.append( QgsRendererCategoryV2( value, newSymbol, value.toString(), true ) );
}

// add null (default) value if not exists
if ( !hasNull )
{
QgsSymbolV2* newSymbol = symbol->clone();
newSymbol->setColor( ramp->color( invert ? 0 : 1 ) );
cats.append( QgsRendererCategoryV2( QVariant( "" ), newSymbol, QString() ) );
cats.append( QgsRendererCategoryV2( QVariant( "" ), newSymbol, QString(), true ) );
}
}

Expand Down Expand Up @@ -791,7 +791,7 @@ void QgsCategorizedSymbolRendererV2Widget::addCategory()
{
if ( !mModel ) return;
QgsSymbolV2 *symbol = QgsSymbolV2::defaultSymbol( mLayer->geometryType() );
QgsRendererCategoryV2 cat( QString(), symbol, QString() );
QgsRendererCategoryV2 cat( QString(), symbol, QString(), true );
mModel->addCategory( cat );
}

Expand Down

0 comments on commit c5340cd

Please sign in to comment.