Revert "fixes #0003361: Spreadsheet: Inserting Row Cause Crash - FC Daily v0.17"
This reverts commit f485a0786f.
This commit is contained in:
committed by
Yorik van Havre
parent
cd0b26a69c
commit
13da3dd830
@@ -358,9 +358,7 @@ Cell * PropertySheet::cellAt(CellAddress address)
|
||||
// address actually inside a merged cell
|
||||
if (j != mergedCells.end()) {
|
||||
std::map<CellAddress, Cell*>::const_iterator i = data.find(j->second);
|
||||
//assert(i != data.end());
|
||||
if (i == data.end())
|
||||
return nullptr;
|
||||
assert(i != data.end());
|
||||
|
||||
return i->second;
|
||||
}
|
||||
@@ -380,9 +378,7 @@ const Cell * PropertySheet::cellAt(CellAddress address) const
|
||||
// address actually inside a merged cell
|
||||
if (j != mergedCells.end()) {
|
||||
std::map<CellAddress, Cell*>::const_iterator i = data.find(j->second);
|
||||
//assert(i != data.end());
|
||||
if (i == data.end())
|
||||
return nullptr;
|
||||
assert(i != data.end());
|
||||
|
||||
return i->second;
|
||||
}
|
||||
@@ -889,9 +885,7 @@ void PropertySheet::getSpans(CellAddress address, int & rows, int & cols) const
|
||||
if (i != mergedCells.end()) {
|
||||
CellAddress anchor = i->second;
|
||||
|
||||
const Cell* cell = cellAt(anchor);
|
||||
if (cell)
|
||||
cell->getSpans(rows, cols);
|
||||
cellAt(anchor)->getSpans(rows, cols);
|
||||
}
|
||||
else {
|
||||
rows = cols = 1;
|
||||
|
||||
Reference in New Issue
Block a user