diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-08 03:42:25 +0200 |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-08 03:42:25 +0200 |
commit | f65a93476422627342404f33a755ae543047eaed (patch) | |
tree | bc8bf7ce4170b568ce606031dc4ededab5d221fc /src | |
parent | 44277b86571d78f30f0d0393d01b11c672672ea2 (diff) | |
parent | f91a2789c385af25310ac5f0463d5bb3311ec089 (diff) | |
download | qt4-tools-f65a93476422627342404f33a755ae543047eaed.tar.gz |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
Fix crash when removing columns in merged row
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/text/qtexttable.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp index 5100176bad..ada18c88d9 100644 --- a/src/gui/text/qtexttable.cpp +++ b/src/gui/text/qtexttable.cpp @@ -915,12 +915,13 @@ void QTextTable::removeColumns(int pos, int num) for (int r = 0; r < d->nRows; ++r) { for (int c = pos; c < pos + num; ++c) { int cell = d->grid[r*d->nCols + c]; - if (touchedCells.contains(cell)) - continue; - touchedCells << cell; QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell); QTextCharFormat fmt = collection->charFormat(it->format); int span = fmt.tableCellColumnSpan(); + if (touchedCells.contains(cell) && span <= 1) + continue; + touchedCells << cell; + if (span > 1) { fmt.setTableCellColumnSpan(span - 1); p->setCharFormat(it.position(), 1, fmt); |