Course rotation goes the wrong way when the image is already flipped, Issue 2239. On behalf of smartyrawtherapee

This commit is contained in:
Ingo
2014-02-18 00:23:27 +01:00
parent 50eb43ede0
commit 79a90d6874
4 changed files with 39 additions and 29 deletions

View File

@@ -109,7 +109,11 @@ void CoarsePanel::initBatchBehavior () {
void CoarsePanel::rotateLeft () {
degree = (degree + 270) % 360;
//Rotate one way or the opposite depending if the image is already flipped or not
if ( (vflip->get_active()) == (hflip->get_active ()) )
degree = (degree + 270) % 360;
else
degree = (degree + 90) % 360;
degreechanged = true;
if (listener)
listener->panelChanged (EvCTRotate, Glib::ustring::format (degree));
@@ -117,7 +121,11 @@ void CoarsePanel::rotateLeft () {
void CoarsePanel::rotateRight () {
degree = (degree + 90) % 360;
//Rotate one way or the opposite depending if the image is already flipped or not
if ( (vflip->get_active()) == (hflip->get_active ()) )
degree = (degree + 90) % 360;
else
degree = (degree + 270) % 360;
degreechanged = true;
if (listener)
listener->panelChanged (EvCTRotate, Glib::ustring::format (degree));