fix scissor box parent
authorJisung Ahn <jcastle.ahn@samsung.com>
Mon, 4 Mar 2013 07:54:15 +0000 (16:54 +0900)
committerJisung Ahn <jcastle.ahn@samsung.com>
Mon, 4 Mar 2013 07:54:15 +0000 (16:54 +0900)
Change-Id: I12187c6e81c92d82d59a03b97e7f91b6daeee514

main/src/view/ivug-crop-view.cpp
main/src/view/ivug-setas-view-callerid.cpp

index 979e500..04d7039 100755 (executable)
@@ -490,7 +490,16 @@ IvugCropView *ivug_crop_view_create(Evas_Object *parent)
        pCropView->bShowMenu = true;
        //_add_gesture_layer(layout, pCropView);
 
-       pCropView->cropbox = ivug_scissorbox_add(layout);
+       pCropView->contents_area = ivug_default_layout_add(parent);
+       evas_object_name_set(pCropView->contents_area, "contets_area");
+       if ( pCropView->contents_area == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create contets_area.");
+       }
+
+       elm_object_part_content_set(pCropView->layout, "crop.contents.swallow", pCropView->contents_area);
+
+       pCropView->cropbox = ivug_scissorbox_add(pCropView->contents_area);
        ivug_scissorbox_type_set(pCropView->cropbox, SCISSOR_BOX_TYPE_2);
 
        elm_object_part_content_set(layout, "scissorbox", pCropView->cropbox);
@@ -506,16 +515,6 @@ IvugCropView *ivug_crop_view_create(Evas_Object *parent)
        pCropView->w = 0;
        pCropView->h = 0;
 
-
-       pCropView->contents_area = ivug_default_layout_add(parent);
-       evas_object_name_set(pCropView->contents_area, "contets_area");
-       if ( pCropView->contents_area == NULL )
-       {
-               MSG_SETAS_ERROR("Cannot create contets_area.");
-       }
-
-       elm_object_part_content_set(pCropView->layout, "crop.contents.swallow", pCropView->contents_area);
-
        return pCropView;
 }
 
index 1dba7bc..6daca35 100755 (executable)
@@ -430,7 +430,17 @@ Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent)
                goto error;
        }
 
-       pSetAsData->crop.box = ivug_scissorbox_add(pSetAsData->layout);
+       MSG_SETAS_HIGH("Create setas layout");
+       pSetAsData->contents_area = ivug_default_layout_add(parent);
+       evas_object_name_set(pSetAsData->contents_area, "contets_area");
+       if ( pSetAsData->contents_area == NULL )
+       {
+               MSG_SETAS_ERROR("Cannot create contets_area.");
+       }
+
+       elm_object_part_content_set(pSetAsData->layout, "setasview.contents.swallow", pSetAsData->contents_area);
+
+       pSetAsData->crop.box = ivug_scissorbox_add(pSetAsData->contents_area);
 
        if ( pSetAsData->crop.box == NULL )
        {
@@ -455,16 +465,6 @@ Evas_Object *_ivug_setas_callerid_create_layout(Evas_Object *parent)
        pSetAsData->bShowMenu = true;
        //_add_gesture_layer(pSetAsData->layout, pSetAsData);
 
-       MSG_SETAS_HIGH("Create setas layout");
-       pSetAsData->contents_area = ivug_default_layout_add(parent);
-       evas_object_name_set(pSetAsData->contents_area, "contets_area");
-       if ( pSetAsData->contents_area == NULL )
-       {
-               MSG_SETAS_ERROR("Cannot create contets_area.");
-       }
-
-       elm_object_part_content_set(pSetAsData->layout, "setasview.contents.swallow", pSetAsData->contents_area);
-
        evas_object_data_set(pSetAsData->layout, "pSetAsData", pSetAsData);
        evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_MOVE, _on_moved, pSetAsData->layout);
        evas_object_event_callback_add(pSetAsData->layout, EVAS_CALLBACK_RESIZE, _on_resized, pSetAsData->layout);