From 69d3fdbe127528136f85ad4900a29b0c6abb0f31 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Thu, 8 Mar 2018 18:30:08 +0900 Subject: [PATCH] Fix wrong parent issue when creating button in tutorial mode Change-Id: I15eeeda67f9c5506a972925296ef32f1418e59b8 Signed-off-by: Jihoon Kim --- src/ise-tutorial-mode.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ise-tutorial-mode.cpp b/src/ise-tutorial-mode.cpp index 007cdb7..93ec2b1 100644 --- a/src/ise-tutorial-mode.cpp +++ b/src/ise-tutorial-mode.cpp @@ -163,6 +163,7 @@ static Eina_Bool tutorial_show_layout_cb(void *data) evas_object_image_file_set(rotate, IMG_POPUP_TUTORIAL_CCW, NULL); } evas_object_image_border_set(rotate, 0, 0, 0, 0); + Evas_Load_Error err_rotate = evas_object_image_load_error_get(rotate); if (err_rotate != EVAS_LOAD_ERROR_NONE) { LOGD("Could not load image, error string is \"%s\"", evas_load_error_str(err_rotate)); @@ -173,6 +174,7 @@ static Eina_Bool tutorial_show_layout_cb(void *data) evas_object_layer_set(rotate, EVAS_LAYER_MAX); evas_object_show(rotate); } + Evas_Object *context = edje_object_add(evas_object_evas_get(tutorial_window)); evas_object_layer_set(context, EVAS_LAYER_MAX); edje_object_file_set(context, EDJ_FILE_PATH, "main"); @@ -183,7 +185,7 @@ static Eina_Bool tutorial_show_layout_cb(void *data) edje_object_part_text_set(context, "title", TUTORIAL_TITLE); edje_object_part_text_set(context, "context1", TUTORIAL_CONTEXT_1); - button = elm_button_add(evas_object_evas_get(tutorial_window)); + button = elm_button_add(tutorial_window); elm_object_style_set(button, "focus"); view_set_image(button, NULL, IMG_POPUP_BUTTON_CANCEL_NORMAL); evas_object_resize(button, BUTTON_WIDTH, BUTTON_HEIGHT); -- 2.7.4