Changeset 8834fc0 in subsurface for qt-models


Ignore:
Timestamp:
Mar 13, 2017, 10:26:18 AM (7 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
0b5f33f3
Parents:
2b5a235
git-author:
Stefan Fuchs <sfuchs@…> (03/13/17 00:25:32)
git-committer:
Dirk Hohndel <dirk@…> (03/13/17 10:26:18)
Message:

Correctly trigger update of cylinder table trash icons in planner

Signed-off-by: Stefan Fuchs <sfuchs@…>

Location:
qt-models
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • qt-models/cylindermodel.cpp

    rac52034 r8834fc0  
    601601}
    602602
     603void CylindersModel::updateTrashIcon()
     604{
     605        emit dataChanged(createIndex(0, 0), createIndex(MAX_CYLINDERS - 1, 0));
     606}
     607
    603608bool CylindersModel::updateBestMixes()
    604609{
  • qt-models/cylindermodel.h

    r0eb42b3 r8834fc0  
    3939        void copyFromDive(struct dive *d);
    4040        void updateDecoDepths(pressure_t olddecopo2);
     41        void updateTrashIcon();
    4142        cylinder_t *cylinderAt(const QModelIndex &index);
    4243        bool changed;
  • qt-models/diveplannermodel.cpp

    r0828427 r8834fc0  
    2525        }
    2626        endRemoveRows();
     27        CylindersModel::instance()->updateTrashIcon();
    2728}
    2829
     
    315316                        if (value.toInt() >= 0 && value.toInt() < MAX_CYLINDERS)
    316317                                p.cylinderid = value.toInt();
     318                        CylindersModel::instance()->updateTrashIcon();
    317319                        break;
    318320                }
     
    733735        }
    734736        endRemoveRows();
     737        CylindersModel::instance()->updateTrashIcon();
    735738}
    736739
Note: See TracChangeset for help on using the changeset viewer.