Spreadsheet: Fixed PropertySheet::Paste(); undo did not work correctly.

This commit is contained in:
Eivind Kvedalen 2015-12-03 21:50:46 +01:00 committed by wmayer
parent aef7bbdf62
commit ae6b934207

View File

@ -260,9 +260,15 @@ void PropertySheet::Paste(const Property &from)
while (icurr != data.end()) {
Cell * cell = icurr->second;
if (cell->isMarked())
clear(ifrom->first);
++icurr;
if (cell->isMarked()) {
std::map<CellAddress, Cell* >::iterator next = icurr;
++next;
clear(icurr->first);
icurr = next;
}
else
++icurr;
}
mergedCells = froms->mergedCells;