[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:09:45
Message-ID: 20100629120945.5515AAC8E0 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1144118 by danders:

Use the correct plane when checking wether grids shall be painted.


 M  +5 -5      KDChartCartesianGrid.cpp  


--- trunk/koffice/plugins/chartshape/kdchart/src/KDChartCartesianGrid.cpp \
#1144117:1144118 @@ -40,18 +40,18 @@
 {
     //qDebug() << "KDChart::CartesianGrid::drawGrid( PaintContext* context ) \
called";  
-    CartesianCoordinatePlane* plane = \
dynamic_cast<CartesianCoordinatePlane*>(context->coordinatePlane()); +    \
CartesianCoordinatePlane* origplane = \
dynamic_cast<CartesianCoordinatePlane*>(context->coordinatePlane());  
     // This plane is used for tranlating the coordinates - not for the data \
boundaries  PainterSaver p( context->painter() );
-    plane = dynamic_cast< CartesianCoordinatePlane* >( plane->sharedAxisMasterPlane( \
context->painter() ) ); +    CartesianCoordinatePlane* plane = dynamic_cast< \
CartesianCoordinatePlane* >( origplane->sharedAxisMasterPlane( context->painter() ) \
);  
     Q_ASSERT_X ( plane, "CartesianGrid::drawGrid",
                  "Bad function call: PaintContext::coodinatePlane() NOT a cartesian \
plane." );  
 
-    const GridAttributes gridAttrsX( plane->gridAttributes( Qt::Horizontal ) );
-    const GridAttributes gridAttrsY( plane->gridAttributes( Qt::Vertical ) );
+    const GridAttributes gridAttrsX( origplane->gridAttributes( Qt::Horizontal ) );
+    const GridAttributes gridAttrsY( origplane->gridAttributes( Qt::Vertical ) );
 
     //qDebug() << "OK:";
     if ( !gridAttrsX.isGridVisible() && !gridAttrsY.isGridVisible() ) return;
@@ -59,7 +59,7 @@
 
     // important: Need to update the calculated mData,
     //            before we may use it!
-    updateData( context->coordinatePlane() );
+    updateData( origplane );
 
     if( plane->axesCalcModeX() == KDChart::AbstractCoordinatePlane::Logarithmic && \
mData.first().stepWidth == 0.0 )  mData.first().stepWidth = 1.0;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic