From 4869e607d1e6ee3cf1cd397af3cccc76c7f2f6b3 Mon Sep 17 00:00:00 2001 From: Javier Celaya Date: Sun, 1 Jun 2014 01:10:18 +0100 Subject: [PATCH] Fix preview rotation --- PreviewWidget.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/PreviewWidget.cpp b/PreviewWidget.cpp index d1b7026..deb7da7 100644 --- a/PreviewWidget.cpp +++ b/PreviewWidget.cpp @@ -67,18 +67,18 @@ void PreviewWidget::rotate(int & x, int & y) const { int tmp; switch (flip) { case 3: - x = width - x; - y = height - y; + x = width - 1 - x; + y = height - 1 - y; break; case 5: tmp = x; - x = height - y; + x = height - 1 - y; y = tmp; break; case 6: tmp = x; x = y; - y = width - tmp; + y = width - 1 - tmp; break; } }