[TSAM-6149]Resolved direction wrongset 58/79458/1 accepted/tizen/mobile/20160712.000745 submit/tizen_mobile/20160711.141643
authorAlka Sethi <alka.sethi@samsung.com>
Mon, 11 Jul 2016 11:13:50 +0000 (16:43 +0530)
committerAlka Sethi <alka.sethi@samsung.com>
Mon, 11 Jul 2016 11:13:50 +0000 (16:43 +0530)
Change-Id: I46e0eefd0920f75f94eb58fbdc742c82a3ebc1fc
Signed-off-by: Alka Sethi <alka.sethi@samsung.com>
src/view/main-view.c

index e19f7c16edd4b299572ed0a785837d676309c977..95be265abb8e9a6787cc8227f0a546a3677d35b1 100755 (executable)
@@ -1769,8 +1769,7 @@ void _main_view_set_target_direction(CamTargetDirection target_direction)
        view->target_direction = target_direction;
        DBG(" target direction = %d , display_direction =%d", target_direction, display_direction);
 
-       if (display_direction != view->target_direction) {
-               switch (view->target_direction) {
+       switch (view->target_direction) {
                case CAM_TARGET_DIRECTION_PORTRAIT:
 #ifndef CAMERA_MACHINE_I686
                        rotationVal = CAMERA_ROTATION_270;
@@ -1797,10 +1796,9 @@ void _main_view_set_target_direction(CamTargetDirection target_direction)
                        break;
                default:
                        break;
-               }
-               if (ret != CAMERA_ERROR_NONE) {
-                       ERR("camera_set_display_rotation failed - code[%x]", ret);
-               }
+       }
+       if (ret != CAMERA_ERROR_NONE) {
+               ERR("camera_set_display_rotation failed - code[%x]", ret);
        }
        _main_view_emit_signal_layout(view->target_direction);
        if (view->device_type == CAMERA_DEVICE_CAMERA1) {