improve editRectangle handling. Fixes #135
Merge pull request #136 from mgmax/develop

improve editRectangle handling. Fixes #135