mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-22 06:12:32 -06:00
Fixed Clear() crash (thx to Zbych)
git-svn-id: svn://ultimatepp.org/upp/trunk@1895 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3a4e1bc772
commit
3d8aa6fd67
1 changed files with 4 additions and 2 deletions
|
|
@ -1978,6 +1978,8 @@ void GridCtrl::SyncPopup()
|
|||
int y = vi.npos + p0.y - p.y - 1 - sby.Get() * int(!fr);
|
||||
|
||||
GetItemAttrs(it, hi.id, hi, vi, popup.style, popup.gd, popup.fg, popup.bg, popup.fnt);
|
||||
popup.gd->row = -1;
|
||||
popup.gd->col = -1;
|
||||
Size scrsz = GetScreenSize();
|
||||
int margin = popup.gd->lm + popup.gd->rm;
|
||||
int cx = min(600, min((int) (scrsz.cx * 0.4), max(it.rcx + margin + 2, hi.nsize + 1)));
|
||||
|
|
@ -5544,8 +5546,8 @@ void GridCtrl::Clear(bool columns)
|
|||
else
|
||||
{
|
||||
total_height = fixed_height;
|
||||
firstVisRow = fixed_rows;
|
||||
lastVisRow = fixed_rows;
|
||||
firstVisRow = fixed_rows - 1;
|
||||
lastVisRow = fixed_rows - 1;
|
||||
}
|
||||
|
||||
valid_cursor = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue