diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-08-25 16:55:26 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-25 14:00:38 -0700 |
commit | 18da0b1911b095ac11a35b5ade82403310f49c74 (patch) | |
tree | d16d14990663b6ad5fb439e15233c441619ef772 /qt-ui/statistics | |
parent | 4a6a9a67063002b917f406333ee66f3f74c3d29c (diff) | |
download | subsurface-18da0b1911b095ac11a35b5ade82403310f49c74.tar.gz |
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 <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/statistics')
-rw-r--r-- | qt-ui/statistics/statisticswidget.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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) |