[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: koffice/plugins/chartshape/kdchart/src
From: Dag Andersen <danders () get2net ! dk>
Date: 2010-06-29 12:11:37
Message-ID: 20100629121137.F418CAC8E2 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1144123 by danders:
Legend:
* Fetch brushes from diagram if there is one.
* Rebuild if datasets are hidden/unhidden.
M +10 -3 KDChartLegend.cpp
--- trunk/koffice/plugins/chartshape/kdchart/src/KDChartLegend.cpp #1144122:1144123
@@ -979,7 +979,10 @@
// as well as through the dataset brush set in the diagram, whereas the
// MarkerAttributes are preferred.
const QBrush markerBrush = markerAttrs[dataset].markerColor().isValid() ?
- QBrush(markerAttrs[dataset].markerColor()) : \
brush( dataset ); + \
QBrush(markerAttrs[dataset].markerColor()) : d->modelBrushes[ dataset ]; +
+ //qDebug()<<"Legend::buildLegend:"<<markerBrush<<markerAttrs[dataset].markerColor().isValid()<<dataset;
+
switch( style ){
case( MarkersOnly ):
markerLineItem = new KDChart::MarkerLayoutItem(
@@ -1086,6 +1089,7 @@
void Legend::setHiddenDatasets( const QList<uint> hiddenDatasets )
{
d->hiddenDatasets = hiddenDatasets;
+ setNeedRebuild();
}
const QList<uint> Legend::hiddenDatasets() const
@@ -1095,11 +1099,14 @@
void Legend::setDatasetHidden( uint dataset, bool hidden )
{
- if( hidden && !d->hiddenDatasets.contains( dataset ) )
+ if( hidden && !d->hiddenDatasets.contains( dataset ) ) {
d->hiddenDatasets.append( dataset );
- else if( !hidden && d->hiddenDatasets.contains( dataset ) )
+ setNeedRebuild();
+ } else if( !hidden && d->hiddenDatasets.contains( dataset ) ) {
d->hiddenDatasets.removeAll( dataset );
+ setNeedRebuild();
}
+}
bool Legend::datasetIsHidden( uint dataset ) const
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic