CTRL+P, click on print and click on other paint tools also remove the current label if it is empty and we are in select mode.

This commit is contained in:
Pere Pujal i Carabantes 2009-10-06 21:53:43 +00:00
parent 0233926eb1
commit ceb8fc5c8a

View file

@ -2360,6 +2360,16 @@ static void mainloop(void)
texttool_len = 0;
cursor_textwidth = 0;
}
else if(cur_tool == TOOL_LABEL &&
cur_label == LABEL_SELECT &&
cur_select == SELECT_ON)
{
cur_select = SELECT_OFF;
rec_undo_buffer();
have_to_rec_label_node = TRUE;
add_label_node(0, 0, 0, 0, &label_node_to_edit, NULL);
derender_node(&label_node_to_edit);
}
print_image();
draw_toolbar();
@ -2621,6 +2631,16 @@ static void mainloop(void)
texttool_len = 0;
cursor_textwidth = 0;
}
else if(cur_tool == TOOL_LABEL &&
cur_label == LABEL_SELECT &&
cur_select == SELECT_ON)
{
cur_select = SELECT_OFF;
rec_undo_buffer();
have_to_rec_label_node = TRUE;
add_label_node(0, 0, 0, 0, &label_node_to_edit, NULL);
derender_node(&label_node_to_edit);
}
}
}
@ -2880,6 +2900,17 @@ static void mainloop(void)
texttool_len = 0;
cursor_textwidth = 0;
}
else if(old_tool == TOOL_LABEL &&
cur_label == LABEL_SELECT &&
cur_select == SELECT_ON)
{
cur_select = SELECT_OFF;
rec_undo_buffer();
have_to_rec_label_node = TRUE;
add_label_node(0, 0, 0, 0, &label_node_to_edit, NULL);
derender_node(&label_node_to_edit);
}
/* original print code was here */
print_image();