Changeset 29741f0 in subsurface


Ignore:
Timestamp:
Jun 24, 2017, 12:06:19 PM (4 weeks ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
d93280f
Parents:
49a3685
Message:

Avoid Q_ASSERT with debug build of Qt

I don't know why we are setting lastIndex to -1. That seems odd.
But for now this workaround will have to do.

Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qt-models/diveimportedmodel.cpp

    r22e4006 r29741f0  
    125125void DiveImportedModel::clearTable()
    126126{
     127        if (lastIndex < firstIndex) {
     128                // just to be sure it's the right numbers
     129                // but don't call RemoveRows or Qt in debug mode with trigger an ASSERT
     130                lastIndex = -1;
     131                firstIndex = 0;
     132                return;
     133        }
    127134        beginRemoveRows(QModelIndex(), 0, lastIndex - firstIndex);
    128135        lastIndex = -1;
Note: See TracChangeset for help on using the changeset viewer.