Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing items in Tree control does not edit the correct item #42419

Closed
EricEzaM opened this issue Sep 30, 2020 · 4 comments
Closed

Editing items in Tree control does not edit the correct item #42419

EricEzaM opened this issue Sep 30, 2020 · 4 comments

Comments

@EricEzaM
Copy link
Contributor

EricEzaM commented Sep 30, 2020

Godot version:
4.0 dev 8016521

OS/device including version:
win 10

Issue description:
If you edit an item and click off that item and on to another item to stop the editing, the item you clicked on to will be edited instead. You can also observe this in the Input map editor where it is very strange and broken. Just clicking around completely breaks it.

inputmapeditor_tree_broken
PS. also the tree does this really annoying thing where sometimes when you select it scrolls upwards... super annoying...

Steps to reproduce:

# script on a Tree control
func _ready():
	var root = create_item()
	hide_root = true
	columns = 1
	
	for i in range (5):
		var item = create_item(root)
		item.set_editable(0, true)
		item.set_text(0, "%s" % i)
	
	pass # Replace with function body.

tree_editing_broken

Minimal reproduction project:
TreeTesting.zip

@EricEzaM
Copy link
Contributor Author

It gets even worse...
tree_broken_2

	for i in range (5):
		var item = create_item(root)
		item.set_editable(0, true)
		item.set_text(0, "%s" % i)
		
		item.set_editable(1, true);
		item.set_cell_mode(1, TreeItem.CELL_MODE_RANGE);
		item.set_range_config(1, 0.0, 1.0, 0.01);
		item.set_range(1, 0.5 / float(i+1));

@alazifk
Copy link

alazifk commented Apr 22, 2022

I think the issue is with the text buffer. It only happens when you click on one cell directly after the other. It does not happen if in-between you click at a non-cell spot.

@Rindbee
Copy link
Contributor

Rindbee commented Jun 12, 2022

May be suppressed by #56408. More difficult to reproduce.

@YuriSizov YuriSizov moved this from Todo to In Progress in 4.x Priority Issues Sep 12, 2022
@EricEzaM
Copy link
Contributor Author

EricEzaM commented Oct 3, 2022

Yeah I can't reproduce any more

@EricEzaM EricEzaM closed this as completed Oct 3, 2022
Repository owner moved this from In Progress to Done in 4.x Priority Issues Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants