Fixed setting previousScrollFocus in Dialog class
Fixed issue with restoring scroll focus in case when dialog creates another dialog
Source code formatted correctly
Capture was removed from button table in Dialog
Merge pull request #1244 from OlegTheCat/master

Fixed setting previousScrollFocus in Dialog class
Fixed viewport checks.

closes #1250
Renamed square setting, made packing try to use smallest square size.

#changes
BufferUtils: add additional method signatures