Timeline: Emit heightChanged() when empty changes

The height of a model is 0 if the model is empty. Thus, when clearing
we have to emit heightChanged().

Change-Id: I6f05c2a32cff648d6aa8e623e17aebe9ae4fcb5c
Task-number: QTCREATORBUG-14507
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Ulf Hermann
2015-05-26 14:02:25 +02:00
parent e034b244c4
commit b8038191e6

View File

@@ -586,8 +586,10 @@ void TimelineModel::clear()
d->endTimes.clear();
if (hadRowHeights)
emit expandedRowHeightChanged(-1, -1);
if (!wasEmpty)
if (!wasEmpty) {
emit emptyChanged();
emit heightChanged();
}
}
int TimelineModel::nextItemBySelectionId(int selectionId, qint64 time, int currentItem) const