Skip to content

Commit

Permalink
Don't crash when laying out from a small frame
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitribouniol committed May 22, 2014
1 parent 435d2d8 commit f420a42
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Classes/MDSpreadView.m
Original file line number Diff line number Diff line change
Expand Up @@ -1813,6 +1813,8 @@ the frames of the affected cells (aka, they used to be pinned)

} else if (totalNumberOfColumnSections > 0 && totalNumberOfRowSections > 0) { // if there is nothing, start fresh, and do the whole thing in one go

[mapForContent removeAllCells];

NSInteger workingColumnSection = minColumnSection;
NSInteger workingColumnIndex = minColumnIndex;

Expand Down Expand Up @@ -2080,6 +2082,8 @@ the frames of the affected cells (aka, they used to be pinned)

} else if (totalNumberOfColumnSections > 0 && totalNumberOfRowSections > 0) { // if there is nothing, start fresh, and do the whole thing in one go

[mapForColumnHeaders removeAllCells];

NSInteger workingColumnSection = minColumnSection;

CGPoint offset = CGPointZero;
Expand Down Expand Up @@ -2406,6 +2410,8 @@ the frames of the affected cells (aka, they used to be pinned)

} else if (totalNumberOfColumnSections > 0 && totalNumberOfRowSections > 0) { // if there is nothing, start fresh, and do the whole thing in one go

[mapForRowHeaders removeAllCells];

NSInteger workingColumnSection = minColumnSection;
NSInteger workingColumnIndex = minColumnIndex;

Expand Down Expand Up @@ -2742,6 +2748,8 @@ the frames of the affected cells (aka, they used to be pinned)

} else if (totalNumberOfColumnSections > 0 && totalNumberOfRowSections > 0) { // if there is nothing, start fresh, and do the whole thing in one go

[mapForCornerHeaders removeAllCells];

NSInteger workingColumnSection = minColumnSection;

CGPoint offset = CGPointZero;
Expand Down

0 comments on commit f420a42

Please sign in to comment.