Fix a crash when opening a new file when the grid is not scrolled to the top

This commit is contained in:
Thomas Goyne 2015-09-13 18:49:46 +02:00
parent ea43700531
commit 85a820918f

View file

@ -571,6 +571,7 @@ void BaseGrid::AdjustScrollbar() {
scrollBar->SetSize(clientSize.GetWidth() - scrollbarSize.GetWidth(), 0, scrollbarSize.GetWidth(), clientSize.GetHeight());
if (GetRows() <= 1) {
yPos = 0;
scrollBar->Enable(false);
scrollBar->Thaw();
return;