Author: axeld Date: 2011-03-04 19:04:10 +0100 (Fri, 04 Mar 2011) New Revision: 40808 Changeset: http://dev.haiku-os.org/changeset/40808 Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp Log: * 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. Modified: haiku/trunk/src/apps/showimage/ShowImageView.cpp =================================================================== --- haiku/trunk/src/apps/showimage/ShowImageView.cpp 2011-03-04 16:39:31 UTC (rev 40807) +++ haiku/trunk/src/apps/showimage/ShowImageView.cpp 2011-03-04 18:04:10 UTC (rev 40808) @@ -1669,7 +1669,7 @@ } -//! image operation initiated by user +//! Image operation initiated by user void ShowImageView::_UserDoImageOperation(ImageProcessor::operation op, bool quiet) { @@ -1681,11 +1681,10 @@ 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(); }