Skip to content
Permalink
Browse files
fixup 4867b7f
  • Loading branch information
jef-n committed Jul 4, 2014
1 parent 4867b7f commit c5340cd7b3c2f9ccb5b42208a7c4942c7c707121
@@ -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 );
@@ -520,6 +520,7 @@ bool QgsFeatureRendererV2::legendSymbolItemsCheckable() const

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

@@ -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
@@ -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 ) );
}
}

@@ -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 );
}

0 comments on commit c5340cd

Please sign in to comment.