mapeditor/tiled




Do you want to work on this issue?
You can request for a bounty in order to promote it!
tiled crash when trying to select an object in warn/error callback from issues view #4189
thmsndk posted onGitHub
Describe the bug When registering a callback for tiled.warn or tiled.error and clicking on it in the issue tab tiled crashes when setting selected or trying to change selectedObjects
tiled.warn("test", function () {
if (obj) {
// First select the object
obj.map.selectedObjects = [];
obj.map.selectedObjects.push(obj);
// obj.layer.selected = true;
// obj.selected = true;
// Then center the view on it
tiled.mapEditor.currentMapView.centerOn(obj.x + obj.width / 2, obj.y + obj.height / 2);
}
});
To Reproduce Steps to reproduce the behavior:
- Go to the issues tab
- Double Click on 'the warning or error
- tiled crashes to desktop with no error
Expected behavior That the object would be selected in the tiled editor
Specifications:
- OS: Windows 11
- Tiled Version: 1.11.2