diff --git a/src/Mod/Spreadsheet/App/PropertySheet.cpp b/src/Mod/Spreadsheet/App/PropertySheet.cpp index 10a1c253fa..96f75baded 100644 --- a/src/Mod/Spreadsheet/App/PropertySheet.cpp +++ b/src/Mod/Spreadsheet/App/PropertySheet.cpp @@ -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(); } diff --git a/src/Mod/Spreadsheet/App/Sheet.cpp b/src/Mod/Spreadsheet/App/Sheet.cpp index e974e522b2..c954721a9c 100644 --- a/src/Mod/Spreadsheet/App/Sheet.cpp +++ b/src/Mod/Spreadsheet/App/Sheet.cpp @@ -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);