A fix for a crash with labels, Undo via CTRL-Z was mangled.
The crash:start, begin to type a label, click on save, hit enter.
This commit is contained in:
parent
94277d1e70
commit
eaa1ff5bd0
1 changed files with 23 additions and 2 deletions
|
|
@ -2085,8 +2085,28 @@ static void mainloop(void)
|
||||||
magic_switchout(canvas);
|
magic_switchout(canvas);
|
||||||
|
|
||||||
if (tool_avail[TOOL_UNDO])
|
if (tool_avail[TOOL_UNDO])
|
||||||
{
|
{
|
||||||
hide_blinking_cursor();
|
if (cursor_x != -1 && cursor_y != -1)
|
||||||
|
{
|
||||||
|
hide_blinking_cursor();
|
||||||
|
if (texttool_len > 0)
|
||||||
|
{
|
||||||
|
rec_undo_buffer();
|
||||||
|
do_render_cur_text(1);
|
||||||
|
texttool_len = 0;
|
||||||
|
cursor_textwidth = 0;
|
||||||
|
label_node_to_edit = NULL;
|
||||||
|
}
|
||||||
|
else if(cur_tool == TOOL_LABEL && label_node_to_edit)
|
||||||
|
{
|
||||||
|
rec_undo_buffer();
|
||||||
|
have_to_rec_label_node = TRUE;
|
||||||
|
add_label_node(0, 0, 0, 0, NULL);
|
||||||
|
derender_node(&label_node_to_edit);
|
||||||
|
label_node_to_edit = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (cur_undo == newest_undo)
|
if (cur_undo == newest_undo)
|
||||||
{
|
{
|
||||||
rec_undo_buffer();
|
rec_undo_buffer();
|
||||||
|
|
@ -19458,6 +19478,7 @@ static void undo_tmp_applied_text()
|
||||||
|
|
||||||
derender_node(&aux_label_node);
|
derender_node(&aux_label_node);
|
||||||
delete_label_list(&aux_label_node);
|
delete_label_list(&aux_label_node);
|
||||||
|
have_to_rec_label_node = FALSE;
|
||||||
do_render_cur_text(0);
|
do_render_cur_text(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue