diff --git a/app/Operations/RotateOp.cpp b/app/Operations/RotateOp.cpp
index 564dc01305a637d0029419e37d67d911b8f1cd23..5e75d2e32782e7cdc9eec8543efafb98abb0b061 100644
--- a/app/Operations/RotateOp.cpp
+++ b/app/Operations/RotateOp.cpp
@@ -33,6 +33,7 @@ using namespace imagein;
 
 RotateOp::RotateOp() : Operation(qApp->translate("Operations", "Rotation").toStdString())
 {
+  _test=false, _angle=0.00;
 }
 
 bool RotateOp::needCurrentImg() const {
@@ -84,9 +85,13 @@ void RotateOp::operator()(const Image* img, const map<const Image*, string>& img
     QObject::connect(buttonBox, SIGNAL(accepted()), dialog, SLOT(accept()));
     QObject::connect(buttonBox, SIGNAL(rejected()), dialog, SLOT(reject()));
 
-    QDialog::DialogCode code = static_cast<QDialog::DialogCode>(dialog->exec());
-
-    if(code!=QDialog::Accepted) return;
+    if(_test){
+      angleSpinBox->setValue(_angle);
+    }
+    else{
+      QDialog::DialogCode code = static_cast<QDialog::DialogCode>(dialog->exec());
+      if(code!=QDialog::Accepted) return;
+    }
 
     double angle = angleSpinBox->value() * acos(0)/90;
     Image::depth_t fillValue = valueSpinBox->value();
@@ -144,3 +149,11 @@ void RotateOp::operator()(const Image* img, const map<const Image*, string>& img
     QString name = qApp->translate("Rotation", "rotated %1").arg(angleSpinBox->value());
     this->outImage(resImg, name.toStdString());
 }
+
+void RotateOp::setTest(bool a){
+  _test =a;
+}
+
+void RotateOp::setAngle(double a){
+  _angle=a;
+}
diff --git a/app/Operations/RotateOp.h b/app/Operations/RotateOp.h
index fdcddad70de627c609aebbf13d65c325e62c8326..2a2f9a36083f28be5fa2dbc434833d835d2a1dd9 100644
--- a/app/Operations/RotateOp.h
+++ b/app/Operations/RotateOp.h
@@ -43,6 +43,14 @@ public:
     void operator()(const imagein::Image*, const std::map<const imagein::Image*, std::string>&);
 
     bool needCurrentImg() const;
+
+    void setTest(bool);
+
+    void setAngle(double);
+
+private:
+    bool _test;
+    double _angle;
 };
 
 #endif // ROTATEOP_H