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

List:       kde-commits
Subject:    extragear/office/skrooge
From:       Stephane Mankowski <stephane () mankowski ! fr>
Date:       2011-02-25 18:49:12
Message-ID: 20110225184912.2D56E3E1F1 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1222736 by smankowski:

BUG 259416: Correction regression for sum computation due to first delivery of 259416

 M  +4 -2      skgbasegui/skgtablewithgraph.cpp  
 M  +1 -1      skrooge_report/skgreportpluginwidget.cpp  


--- trunk/extragear/office/skrooge/skgbasegui/skgtablewithgraph.cpp #1222735:1222736
@@ -1137,6 +1137,7 @@
         double ymin = (m_zeroVisible || mode == STACK ? 0 : 9999999);
         double ymax = (m_zeroVisible || mode == STACK ? 0 : -9999999);
         int x = 0;
+        int nbRowsDrawed = 0;
         for(int xx = 0; xx < nbRows; ++xx) {
             SKGColorButton* colorButton = \
qobject_cast<SKGColorButton*>(ui.kTable->cellWidget(xx, 0));  if(colorButton) {
@@ -1145,6 +1146,7 @@
                 double yPlus = 0;
                 double yMoins = 0;
                 int jprevious = -1;
+                ++nbRowsDrawed;
                 for(int j = 1; j < nbColumns; ++j) {
                     //Get column name
                     QString yname = ui.kTable->horizontalHeaderItem(j)->text();
@@ -1451,7 +1453,7 @@
         }
 
         //Draw Average
-        bool lineCondition = m_limitVisible && (mode == HISTOGRAM || mode == POINT \
|| mode == LINE) && scaleText && nbRows == 1; +        bool lineCondition = \
m_limitVisible && (mode == HISTOGRAM || mode == POINT || mode == LINE) && scaleText \
&& nbRowsDrawed == 1;  int averageCol = getAverageColumnIndex();
         if(lineCondition && averageCol != -1) {
             QTableWidgetItem* tableItem = ui.kTable->item(0, averageCol);
@@ -1520,7 +1522,7 @@
         }
 
         //Draw Linear Regression
-        bool lineCondition2 = m_linearRegressionVisible && (mode == HISTOGRAM || \
mode == POINT || mode == LINE) && scaleText && nbRows == 1; +        bool \
lineCondition2 = m_linearRegressionVisible && (mode == HISTOGRAM || mode == POINT || \
mode == LINE) && scaleText && nbRowsDrawed == 1 ;  if(lineCondition2 && \
                m_indexLinearRegression != -1) {
             QTableWidgetItem* tableItem = ui.kTable->item(0, \
m_indexLinearRegression);  if(tableItem) {
--- trunk/extragear/office/skrooge/skrooge_report/skgreportpluginwidget.cpp \
#1222735:1222736 @@ -1182,7 +1182,7 @@
 
                         SKGTableWithGraph::DisplayAdditionalFlag dmode = \
                SKGTableWithGraph::NONE;
                         if(m_attsForColumns.at(col).startsWith(QLatin1String("d_"))) \
                dmode |= SKGTableWithGraph::AVERAGE | SKGTableWithGraph::LIMITS;
-                        //259416 if (!modeHistory) dmode |= SKGTableWithGraph::SUM;
+                        if(!modeHistory) dmode |= SKGTableWithGraph::SUM;
                         ui.kTableWithGraph->setData(table, primaryUnit, \
secondaryUnit, dmode, nbVirtualColumn);  
                         //Enable/Disable buttons


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

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