Spreadsheet: improve efficiency when pasting many cells
This commit is contained in:
@@ -433,7 +433,6 @@ void PropertySheet::pasteCells(XMLReader &reader, Range dstRange) {
|
||||
if(!dst.isValid())
|
||||
continue;
|
||||
owner->clear(dst);
|
||||
owner->cellUpdated(dst);
|
||||
}
|
||||
}
|
||||
range.next();
|
||||
@@ -480,7 +479,6 @@ void PropertySheet::pasteCells(XMLReader &reader, Range dstRange) {
|
||||
recomputeDependencies(dst);
|
||||
}
|
||||
dirty.insert(dst);
|
||||
owner->cellUpdated(dst);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -493,11 +491,11 @@ void PropertySheet::pasteCells(XMLReader &reader, Range dstRange) {
|
||||
if(!dst.isValid())
|
||||
continue;
|
||||
owner->clear(dst);
|
||||
owner->cellUpdated(dst);
|
||||
}
|
||||
}
|
||||
}while(range.next());
|
||||
}
|
||||
owner->rangeUpdated(Range(from, to));
|
||||
}
|
||||
signaller.tryInvoke();
|
||||
}
|
||||
|
||||
@@ -1081,12 +1081,14 @@ short Sheet::mustExecute(void) const
|
||||
void Sheet::clear(CellAddress address, bool /*all*/)
|
||||
{
|
||||
Cell * cell = getCell(address);
|
||||
if (!cell)
|
||||
return;
|
||||
std::string addr = address.toString();
|
||||
Property * prop = props.getDynamicPropertyByName(addr.c_str());
|
||||
|
||||
// Remove alias, if defined
|
||||
std::string aliasStr;
|
||||
if (cell && cell->getAlias(aliasStr))
|
||||
if (cell->getAlias(aliasStr))
|
||||
this->removeDynamicProperty(aliasStr.c_str());
|
||||
|
||||
cells.clear(address);
|
||||
|
||||
Reference in New Issue
Block a user