From 65763c9728a4728b99d938ae0b5972353e55c9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Fri, 4 Mar 2011 18:04:10 +0000 Subject: [PATCH] * Fit image to the view bounds again after a rotation (it's quite annoying when you suddenly only see part of the image). This could be improved by only doing so if the image was fit before, too. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40808 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/showimage/ShowImageView.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index 94685f6154..a95656171d 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -1669,7 +1669,7 @@ ShowImageView::_DoImageOperation(ImageProcessor::operation op, bool quiet) } -//! image operation initiated by user +//! Image operation initiated by user void ShowImageView::_UserDoImageOperation(ImageProcessor::operation op, bool quiet) { @@ -1681,11 +1681,10 @@ ShowImageView::_UserDoImageOperation(ImageProcessor::operation op, bool quiet) void ShowImageView::Rotate(int degree) { - if (degree == 90) { - _UserDoImageOperation(ImageProcessor::kRotateClockwise); - } else if (degree == 270) { - _UserDoImageOperation(ImageProcessor::kRotateCounterClockwise); - } + _UserDoImageOperation(degree == 90 ? ImageProcessor::kRotateClockwise + : ImageProcessor::kRotateCounterClockwise); + + FitToBounds(); }