X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=src%2Fcurrentalertstablemodel.cpp;h=763163078cdaf17aea230f58ef946d8811b2c70f;hb=683d958489cb5181a1a8c5a348191aaeed03981b;hp=cc47fd09c60ccec8c0b2dae3368fbca890260472;hpb=874cc23a01cab548a265daf6a60373345b3e2064;p=kitchenalert diff --git a/src/currentalertstablemodel.cpp b/src/currentalertstablemodel.cpp index cc47fd0..7631630 100644 --- a/src/currentalertstablemodel.cpp +++ b/src/currentalertstablemodel.cpp @@ -293,8 +293,11 @@ void CurrentAlertsTableModel::setUpdateViewOnChanges(bool update) { updateViewOnChanges_ = update; if (update == true) + { refreshTimeAndStatusColumns(); //Refresh to catch up with past changes -} + qDebug() << "Just refreshed time and status colums after returning to the app"; + } + } bool CurrentAlertsTableModel::isThisTimerAlerting(QModelIndex index) { @@ -308,3 +311,17 @@ bool CurrentAlertsTableModel::isThisTimerAlerting(QModelIndex index) } return false; } + +void CurrentAlertsTableModel::removeTimer(QModelIndex index) +{ + if (index.isValid() == false) + return; + + int i = index.row(); + beginRemoveRows(QModelIndex(),i,i); + Timer * p_timer = currentTimers_.takeAt(i); + delete p_timer; + endRemoveRows(); + +} +