Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/text/qtexttable.cpp

    r651 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 201 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation ([email protected])
     
    755755    p->beginEditBlock();
    756756
     757
    757758    for (int i = 0; i < d->nRows; ++i) {
    758759        int cell;
     
    761762        else
    762763            cell = d->grid[i*d->nCols + pos];
    763         QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
    764         QTextCharFormat fmt = c->charFormat(it->format);
    765764        if (pos > 0 && pos < d->nCols && cell == d->grid[i*d->nCols + pos - 1]) {
    766765            // cell spans the insertion place, extend it
    767             fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num);
    768             p->setCharFormat(it.position(), 1, fmt);
     766            if (!extendedSpans.contains(cell)) {
     767                QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
     768                QTextCharFormat fmt = c->charFormat(it->format);
     769                fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num);
     770                p->setCharFormat(it.position(), 1, fmt);
     771                d->dirty = true;
     772                extendedSpans << cell;
     773            }
    769774        } else {
     775
     776
     777
     778
     779
     780
     781
     782
     783
     784
     785
     786
     787
     788
     789
    770790            fmt.setTableCellRowSpan(1);
    771791            fmt.setTableCellColumnSpan(1);
     
    916936        for (int c = pos; c < pos + num; ++c) {
    917937            int cell = d->grid[r*d->nCols + c];
    918             if (touchedCells.contains(cell))
    919                 continue;
    920             touchedCells << cell;
    921938            QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
    922939            QTextCharFormat fmt = collection->charFormat(it->format);
    923940            int span = fmt.tableCellColumnSpan();
     941
     942
     943
     944
    924945            if (span > 1) {
    925946                fmt.setTableCellColumnSpan(span - 1);
Note: See TracChangeset for help on using the changeset viewer.