From 18da0b1911b095ac11a35b5ade82403310f49c74 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 25 Aug 2014 16:55:26 -0300 Subject: Implement the modelDataChanged to repopulate the widget on Statistics The modelDataChanged method will remove all items and recreate everything *right* now we will never use it, because we are not triggering any changes on the model, but simply deleting and recreating it everytime we open the dialog. to be changed in the future. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/statistics/statisticswidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'qt-ui/statistics') diff --git a/qt-ui/statistics/statisticswidget.cpp b/qt-ui/statistics/statisticswidget.cpp index 6dafba606..a812cffde 100644 --- a/qt-ui/statistics/statisticswidget.cpp +++ b/qt-ui/statistics/statisticswidget.cpp @@ -26,7 +26,10 @@ void YearlyStatisticsWidget::modelRowsInserted(const QModelIndex &index, int fir void YearlyStatisticsWidget::modelDataChanged(const QModelIndex &topLeft, const QModelIndex& bottomRight) { - // stub + Q_UNUSED(topLeft); + Q_UNUSED(bottomRight); + scene()->clear(); + modelRowsInserted(QModelIndex(),0,m_model->rowCount()-1); } void YearlyStatisticsWidget::resizeEvent(QResizeEvent *event) -- cgit v1.2.3-70-g09d2