diff options
author | Thomas White <taw@bitwiz.org.uk> | 2013-09-06 23:06:00 +0200 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2013-09-06 23:06:00 +0200 |
commit | 82f6addeb39130c9467db4f92a8979fc3b30e529 (patch) | |
tree | 9c2d34014dd5f0c1e79c619a2d444d8b3ddc1ac0 /src/mainwindow.c | |
parent | f916507c9c1c38bd7920005422685fef227664ba (diff) |
Fix up negative resize
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r-- | src/mainwindow.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index 1b5a8d6..d73f690 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -1467,6 +1467,16 @@ static void do_resize(struct presentation *p, double x, double y, assert(p->n_selection > 0); + if ( w < 0.0 ) { + w = -w; + x -= w; + } + + if ( h < 0.0 ) { + h = -h; + y -= h; + } + fr = p->selection[0]; fr->lop.x = x; fr->lop.y = y; |