* 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
This commit is contained in:
Axel Dörfler 2011-03-04 18:04:10 +00:00
parent 8723d9bbb5
commit 65763c9728

View File

@ -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();
}