Only set MyStepPanel.LastAdjust if MyStepPanel isn't null

After StepRTB is resized verify that text has not scrolled out of view
This commit is contained in:
Rich
2011-08-09 20:12:40 +00:00
parent 33b03c0a9a
commit 6047e40ba0
2 changed files with 5 additions and 1 deletions

View File

@@ -1076,7 +1076,11 @@ namespace Volian.Controls.Library
this.Size = szNew;
//Console.WriteLine("after {0}, {1}, {2}, {3}", Size, szNew, widthNew, Width);
if (heightOld != Height)
{
OnHeightChanged(this, new EventArgs());
if (ScrollPos.Y != 0) // Adjust ScrollPosition if it isn't Zero
ScrollPos = new Point(0, 0);
}
}
}
}