Merge pull request #136 from mgmax/develop

improve editRectangle handling. Fixes #135
Improve main window resizing. Fixes #133