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

TreeItem shows cell edit in wrong column when SelectMode=Row #88892

Closed
JHaller27 opened this issue Feb 27, 2024 · 0 comments · Fixed by #89977
Closed

TreeItem shows cell edit in wrong column when SelectMode=Row #88892

JHaller27 opened this issue Feb 27, 2024 · 0 comments · Fixed by #89977
Milestone

Comments

@JHaller27
Copy link

Tested versions

Reproducible in:

  • v4.3.dev3.official [36e943b6b]
  • v4.2.1.stable.official [b09f79f5]
  • v4.1.4.rc1.official [b9008f3d5]
  • v4.0.alpha1.official [31a7ddbf8]
  • v3.5.3.stable.official [6c814135b]
  • v3.3.stable.official
  • v3.2.stable.official

Unable to test in lower versions due to other bugs. Did not test in major versions lower than 3.

System information

Godot v4.2.1.stable - Windows 10.0.19045 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3070 (NVIDIA; 31.0.15.4633) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

Issue description

Selecting the last cell so as to edit it, actually edits the first cell. Other cells are not editable, despite calling set_editable(column_idx, true).

Expected

At the very least, the TextEdit should visually be in the column that's being edited.

Ideally, clicking anywhere in the row (i.e. instead of a particular column, as indicated by the Select Mode) should trigger the editable behavior. Short of that, clicking the editable column should trigger the editable behavior.

Steps to reproduce

Given a Tree where...

  • the Tree has at least 1 TreeItem child
  • All columns in the TreeItem(s) are set to editable i.e. child.set_editable(column_idx, true)
  • Tree.columns = 3 (anything >1 repros, but tested primarily using 3)
  • Select Mode set to Row

When the user clicks any column except the last column...
Then nothing is editable.

When the user clicks the last column...
Then the last column switches to a TextEdit containing the text in the first column.

When the user clicks the last column and edits the text...
The first column's text updates to the new text.

Minimal reproduction project (MRP)

TreeEditableBug.zip

@akien-mga akien-mga added this to the 4.3 milestone Apr 4, 2024
DanielSnd pushed a commit to DanielSnd/godot that referenced this issue Apr 10, 2024
…hen SelectMode=Row and TreeItem has multiple columns

Editor would not be brought up when clicking on all but the last column on a TreeItem with SelectMode=Row with
multiple columns and when the editor was being brought up when clicking on the last column, it was editing the first column

Fixed draw_item, gui_input and edit_selected functions by setting set_meta parameter for each column
Fixed select_single_item function by changing selected_col depending on input
divshekhar pushed a commit to divshekhar/godot that referenced this issue Apr 23, 2024
…hen SelectMode=Row and TreeItem has multiple columns

Editor would not be brought up when clicking on all but the last column on a TreeItem with SelectMode=Row with
multiple columns and when the editor was being brought up when clicking on the last column, it was editing the first column

Fixed draw_item, gui_input and edit_selected functions by setting set_meta parameter for each column
Fixed select_single_item function by changing selected_col depending on input
MewPurPur pushed a commit to MewPurPur/godot that referenced this issue Jul 11, 2024
…hen SelectMode=Row and TreeItem has multiple columns

Editor would not be brought up when clicking on all but the last column on a TreeItem with SelectMode=Row with
multiple columns and when the editor was being brought up when clicking on the last column, it was editing the first column

Fixed draw_item, gui_input and edit_selected functions by setting set_meta parameter for each column
Fixed select_single_item function by changing selected_col depending on input
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants