overwriting layernames when multiple tilemaps are open #1396

Clas1 opened this Issue Nov 14, 2016 · 1 comment


None yet

2 participants

Clas1 commented Nov 14, 2016

when a layer is selected in one map, doubleclicking a layer on another tilemaps leads to overwriting the layername in the first map

@bjorn bjorn added the Bug label Nov 14, 2016
@bjorn bjorn self-assigned this Nov 14, 2016
@bjorn bjorn added a commit that closed this issue Nov 14, 2016
@bjorn Fixed wrong layer name getting edited when switching maps
When double-clicking a layer (which opens the inline editor for renaming
the layer) and then switching to another map, the layer at the same
index in the new map would get the name in the inline editor.

To avoid this, explicitly commit the data before switching the model.

Closes #1396
@bjorn bjorn closed this in dcd95fe Nov 14, 2016
bjorn commented Nov 14, 2016

Nice catch. It appears to have been a bug in Qt since it only affected builds against Qt 5.7. For earlier Qt versions and for the current dev version of Qt, the editor was silently closed without committing a possible rename.

After my patch, if the text was changed before switching maps, then it will lead to a layer rename before the map is switched. I think this behavior is slightly better since it is the same when you focus something else, so I'll leave it be.

@bjorn bjorn added the Qt issue label Nov 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment