Skip to content

Commit e75e02f

Browse files
committed
Revert "Revert "Merge pull request livecode#1148 from runrevsebastien/bugfix-13374""
This reverts commit b206663.
1 parent 9a65329 commit e75e02f

2 files changed

Lines changed: 13 additions & 8 deletions

File tree

docs/notes/bugfix-13374.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
LiveCode hangs when setting the text of a field with HGRID and a hidden last line

engine/src/fieldf.cpp

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,14 +1023,18 @@ void MCField::drawrect(MCDC *dc, const MCRectangle &dirty)
10231023
{
10241024
setforeground(dc, DI_BORDER, False);
10251025

1026-
int32_t cy;
1027-
cy = y + pgheight;
1028-
while(cy < grect . y + grect . height)
1029-
{
1030-
if (y >= grect . y)
1031-
dc -> drawline(grect . x, cy, grect . x + grect . width, cy);
1032-
cy += pgheight;
1033-
}
1026+
// SN-2014-09-10: [[ Bug 13374 ]] If the last line is hidden, the we take the field's lineheight.
1027+
if (pgheight == 0)
1028+
pgheight = fixedheight;
1029+
1030+
int32_t cy;
1031+
cy = y + pgheight;
1032+
while(cy < grect . y + grect . height)
1033+
{
1034+
if (y >= grect . y)
1035+
dc -> drawline(grect . x, cy, grect . x + grect . width, cy);
1036+
cy += pgheight;
1037+
}
10341038
}
10351039

10361040
// MW-2012-03-15: [[ Bug 10069 ]] If we have vGrid set on the field, then render grid lines

0 commit comments

Comments
 (0)