summaryrefslogtreecommitdiff
path: root/src/libs
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-04-09 15:34:09 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-04-14 15:19:46 +0000
commit0df8cc2e0287203d05233b22a90a70db3ba2557c (patch)
tree351c560d225cb0ddfb29e20299b29e6bf4f5a31a /src/libs
parent34f2722515a39493ce59d22b11862b1719519ec0 (diff)
downloadqt-creator-0df8cc2e0287203d05233b22a90a70db3ba2557c.tar.gz
Timeline: Clear excess row heights when reducing the number of rows
Otherwise, if you increase the number of rows again later you get surprising results. Change-Id: I3ec809820716368849415f9dcdb1ec9208844353 Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/timeline/timelinemodel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libs/timeline/timelinemodel.cpp b/src/libs/timeline/timelinemodel.cpp
index 099492114c..2b1d7d50cc 100644
--- a/src/libs/timeline/timelinemodel.cpp
+++ b/src/libs/timeline/timelinemodel.cpp
@@ -136,6 +136,8 @@ void TimelineModel::setExpandedRowCount(int rows)
{
Q_D(TimelineModel);
if (d->expandedRowCount != rows) {
+ if (d->rowOffsets.length() > rows)
+ d->rowOffsets.resize(rows);
d->expandedRowCount = rows;
emit expandedRowCountChanged();
if (d->expanded)