Not calling magic_switchin() if we're about to quit...

This commit is contained in:
William Kendrick 2009-02-23 00:13:37 +00:00
parent a6313ab449
commit 7a98f224fe
2 changed files with 17 additions and 7 deletions

View file

@ -8,7 +8,7 @@ http://www.tuxpaint.org/
$Id$ $Id$
2009.February.21 (0.9.21) 2009.February.22 (0.9.21)
* New Starters: * New Starters:
------------- -------------
* Silver Frame * Silver Frame
@ -118,6 +118,11 @@ $Id$
* Updated to the latest version (2.27) of DejaVu Sans Regular for UI font. * Updated to the latest version (2.27) of DejaVu Sans Regular for UI font.
* Bug Fixes:
----------
* Was inadvertently calling "magic_switchin()" on Quit. Fixed.
Dan Shields <d4ndeveloper@gmail.com>
* New localizations: * New localizations:
------------------ ------------------
* Shuswap (Secwepemctín) translation * Shuswap (Secwepemctín) translation

View file

@ -22,7 +22,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(See COPYING.txt) (See COPYING.txt)
June 14, 2002 - January 2, 2009 June 14, 2002 - February 22, 2009
$Id$ $Id$
*/ */
@ -1983,7 +1983,8 @@ static void mainloop(void)
{ {
magic_switchout(canvas); magic_switchout(canvas);
done = do_quit(cur_tool); done = do_quit(cur_tool);
magic_switchin(canvas); if (!done)
magic_switchin(canvas);
} }
else if (event.type == SDL_ACTIVEEVENT) else if (event.type == SDL_ACTIVEEVENT)
{ {
@ -2006,7 +2007,8 @@ static void mainloop(void)
{ {
magic_switchout(canvas); magic_switchout(canvas);
done = do_quit(cur_tool); done = do_quit(cur_tool);
magic_switchin(canvas); if (!done)
magic_switchin(canvas);
} }
else if (key == SDLK_s && (mod & KMOD_ALT)) else if (key == SDLK_s && (mod & KMOD_ALT))
{ {
@ -2034,14 +2036,16 @@ static void mainloop(void)
{ {
magic_switchout(canvas); magic_switchout(canvas);
done = do_quit(cur_tool); done = do_quit(cur_tool);
magic_switchin(canvas); if (!done)
magic_switchin(canvas);
} }
#ifdef WIN32 #ifdef WIN32
else if (key == SDLK_F4 && (mod & KMOD_ALT)) else if (key == SDLK_F4 && (mod & KMOD_ALT))
{ {
magic_switchout(canvas); magic_switchout(canvas);
done = do_quit(cur_tool); done = do_quit(cur_tool);
magic_switchin(canvas); if (!done)
magic_switchin(canvas);
} }
#endif #endif
else if (key == SDLK_z && (mod & KMOD_CTRL) && !noshortcuts) else if (key == SDLK_z && (mod & KMOD_CTRL) && !noshortcuts)
@ -2701,7 +2705,8 @@ static void mainloop(void)
update_screen_rect(&r_ttoolopt); update_screen_rect(&r_ttoolopt);
} }
magic_switchin(canvas); if (!done)
magic_switchin(canvas);
} }
else if (HIT(r_toolopt) && valid_click(event.button.button)) else if (HIT(r_toolopt) && valid_click(event.button.button))
{ {