rec_undo_buffer() picks up any stuff put onto canvas by a magic_switchin().

Calling switchout/switchin around the recorder. (Suboptimal!)
This commit is contained in:
William Kendrick 2009-10-14 05:01:20 +00:00
parent 44422bac91
commit f4c25c5edc

View file

@ -2351,6 +2351,8 @@ static void mainloop(void)
if (!disable_print) if (!disable_print)
{ {
magic_switchout(canvas);
/* If they haven't hit [Enter], but clicked 'Print', add their text now -bjk 2007.10.25 */ /* If they haven't hit [Enter], but clicked 'Print', add their text now -bjk 2007.10.25 */
if ((cur_tool == TOOL_TEXT || cur_tool == TOOL_LABEL) && texttool_len > 0) if ((cur_tool == TOOL_TEXT || cur_tool == TOOL_LABEL) && texttool_len > 0)
{ {
@ -2371,6 +2373,9 @@ static void mainloop(void)
} }
print_image(); print_image();
magic_switchin(canvas);
draw_toolbar(); draw_toolbar();
draw_tux_text(TUX_BORED, "", 0); draw_tux_text(TUX_BORED, "", 0);
update_screen_rect(&r_tools); update_screen_rect(&r_tools);
@ -3806,7 +3811,9 @@ static void mainloop(void)
/* Start doing magic! */ /* Start doing magic! */
magic_switchout(canvas); /* <-- FIXME: I dislike this -bjk 2009.10.13 */
rec_undo_buffer(); rec_undo_buffer();
magic_switchin(canvas); /* <-- FIXME: I dislike this -bjk 2009.10.13 */
if (cur_undo > 0) if (cur_undo > 0)
undo_ctr = cur_undo - 1; undo_ctr = cur_undo - 1;