Fix a bug, forgot one i++ in StatsPanel
Don't rotate labels if it's day number in StatsPanel
This commit is contained in:
		| @@ -255,7 +255,7 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT | |||||||
|  |  | ||||||
| 	i=0; | 	i=0; | ||||||
|     	for (account = 0, i = 0, accountIt = user->_accounts.begin(); accountIt != user->_accounts.end();  |     	for (account = 0, i = 0, accountIt = user->_accounts.begin(); accountIt != user->_accounts.end();  | ||||||
|     	     account++, accountIt++, i++) |     	     account++, accountIt++) | ||||||
|     	{ |     	{ | ||||||
| 	    if (_account->item(account)->checkState() != Qt::Checked) | 	    if (_account->item(account)->checkState() != Qt::Checked) | ||||||
|     		continue; |     		continue; | ||||||
| @@ -340,9 +340,13 @@ void StatsPanel::UpdateStats(int monthFrom, int yearFrom, int monthTo, int yearT | |||||||
|     xAxis->setLabels(xlabels); |     xAxis->setLabels(xlabels); | ||||||
|     xAxis->setShortLabels(xlabels); |     xAxis->setShortLabels(xlabels); | ||||||
|      |      | ||||||
|  |     // Rotate only for months names | ||||||
|  |     if (monthFrom != monthTo || yearFrom != yearTo) | ||||||
|  |     { | ||||||
| 	KDChart::TextAttributes axisTextAttr(xAxis->textAttributes()); | 	KDChart::TextAttributes axisTextAttr(xAxis->textAttributes()); | ||||||
| 	axisTextAttr.setRotation(-60); | 	axisTextAttr.setRotation(-60); | ||||||
| 	xAxis->setTextAttributes(axisTextAttr); | 	xAxis->setTextAttributes(axisTextAttr); | ||||||
|  |     } | ||||||
|  |  | ||||||
|     _plot->lineDiagram()->addAxis(xAxis); |     _plot->lineDiagram()->addAxis(xAxis); | ||||||
|     _plot->lineDiagram()->addAxis(yAxis); |     _plot->lineDiagram()->addAxis(yAxis); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user