14.22 on_text_changed fires multi with highlight/delete

This subforum contains all the issues which we already resolved.
Nexela
Smart Inserter
Smart Inserter
Posts: 1828
Joined: Wed May 25, 2016 11:09 am
Contact:

14.22 on_text_changed fires multi with highlight/delete

Post by Nexela »

Not sure if a bug/intended/or already reported but
on_gui_text_changed fires multiple times when deleting higlighted regions

Code: Select all

/c
game.player.gui.center.add{type="textfield", name = "argh"}
script.on_event(defines.events.on_gui_text_changed, function(event) game.print("string = "..game.players[event.player_index].gui.center.argh.text) end)
Select this line and paste into the textbox with ctrl-v
event fires once
highlight entire line in the textbox and press delete
event fires for each character removed
Rseding91
Factorio Staff
Factorio Staff
Posts: 16000
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: 14.22 on_text_changed fires multi with highlight/delete

Post by Rseding91 »

This is due to the "cut" method being incredibly inefficient in how it worked with the graphics library we use. It's fixed for 0.15 :)
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Resolved Problems and Bugs”