Re: [Tuxpaint-devel] switchin() switchout()
An award-winning drawing program for children of all ages
Brought to you by:
wkendrick
|
From: Bill K. <nb...@so...> - 2008-07-13 20:32:24
|
On Sun, Jul 13, 2008 at 04:56:57PM +0200, foo-script wrote: > I see many useful applications of these functions, but I can't solve this: > Tuxpaint calls switchout() when user decides to create new image, but also calls this function when user uses Undo. Can I avoid calling switchout() when Undo? > > Using switchin() I create an important data - table. Each image can have quite different values in this variable, so each switchout() frees this data (in case of creating new image). Undo also calls switchout() - that's makes problem. The way it works right now is useful for cases where you don't want to leave junk on the canvas when the user is 'done' (either temporarily, or permanently) with your Magic tool. Albert's history stuff (see his post) is interesting and likely useful. Another thing that could help is to tell you, in switchin()/switchout(), what's going on. -- -bill! "Tux Paint" - free children's drawing software for Windows / Mac OS X / Linux! Download it today! http://www.tuxpaint.org/ |