template: Fix line count of textblock part inserted in live edit mode.

Previously, line count was not correct after textblock part is inserted
in live edit mode.
Now, line count is correctly calculated after textblock part is inserted
in live edit mode.

Test Plan
1. Insert textblock part in live edit mode.
2. Check max line number.
This commit is contained in:
Jaehyun Cho 2016-05-31 14:12:21 +09:00
parent 98d9cf4cb0
commit 1dd3d5c465
1 changed files with 2 additions and 1 deletions

View File

@ -131,7 +131,7 @@ textblock_style_add(edit_data *ed, const char *style_name)
}
int line_inc = TEMPLATE_TEXTBLOCK_STYLE_LINE_CNT;
if (!styles_block) line_inc += 2;
if (styles_block) line_inc -= 2;
edit_line_increase(ed, line_inc);
int cursor_pos2 = elm_entry_cursor_pos_get(edit_entry);
@ -286,6 +286,7 @@ template_part_insert(edit_data *ed, Edje_Part_Type part_type,
snprintf(buf, sizeof(buf), " text.style: \"%s\";<br/>",
random_name);
elm_entry_entry_insert(edit_entry, buf);
line_cnt++;
}
//Apply align values