Remove unfinished "Label" text on New or Open
Text from unfinished "Label" tool input would appear after creating a New image or Opening an existing one. Mended. Closes https://sourceforge.net/p/tuxpaint/bugs/246/ Mostly by Pere.
This commit is contained in:
parent
2e69c51bdb
commit
bf7e8897d6
2 changed files with 24 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ Various contributors (see below, and AUTHORS.txt)
|
|||
https://tuxpaint.org/
|
||||
|
||||
|
||||
2022.January.21 (0.9.29)
|
||||
2022.January.23 (0.9.29)
|
||||
* Improvements to "Stamp" tool:
|
||||
-----------------------------
|
||||
* Stamps may now be rotated.
|
||||
|
|
@ -150,6 +150,12 @@ https://tuxpaint.org/
|
|||
in zoom(). [Note: That should be replaced with an SDL2_gfx call!]
|
||||
Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
* Text from unfinished "Label" tool input would appear after
|
||||
creating a New image or Opening an existing one. Mended.
|
||||
Closes https://sourceforge.net/p/tuxpaint/bugs/246/
|
||||
Pere Pujal i Carabantes <perepujal@gmail.com>
|
||||
and Bill Kendrick <bill@newbreedsoftware.com>
|
||||
|
||||
* Ports & Building:
|
||||
-----------------
|
||||
* Processed PNG images through `pngout` to increase some compression
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
(See COPYING.txt)
|
||||
|
||||
June 14, 2002 - January 19, 2023
|
||||
June 14, 2002 - January 23, 2023
|
||||
*/
|
||||
|
||||
#include "platform.h"
|
||||
|
|
@ -18330,6 +18330,14 @@ static int do_open(void)
|
|||
label_node_to_edit = NULL;
|
||||
have_to_rec_label_node = FALSE;
|
||||
|
||||
/* Clean stale text */
|
||||
if (texttool_len > 0)
|
||||
{
|
||||
texttool_str[0] = L'\0';
|
||||
texttool_len = 0;
|
||||
cursor_textwidth = 0;
|
||||
}
|
||||
|
||||
SDL_FillRect(label, NULL, SDL_MapRGBA(label->format, 0, 0, 0, 0));
|
||||
|
||||
/* Figure out filename: */
|
||||
|
|
@ -23760,6 +23768,14 @@ static int do_new_dialog(void)
|
|||
highlighted_label_node = label_node_to_edit = NULL;
|
||||
have_to_rec_label_node = FALSE;
|
||||
|
||||
/* Clean stale text */
|
||||
if (texttool_len > 0)
|
||||
{
|
||||
texttool_str[0] = L'\0';
|
||||
texttool_len = 0;
|
||||
cursor_textwidth = 0;
|
||||
}
|
||||
|
||||
if (which >= first_starter
|
||||
&& (first_template == -1 || which < first_template)
|
||||
&& (!new_colors_last || which < first_color))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue