mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.26k stars 1.76k forks source link

Fixed issue with placing tile objects after switching maps #4076

Closed bjorn closed 1 month ago

bjorn commented 1 month ago

The "current tile" was not being restored correctly after switching maps, when another type of object had been focused (for example due to switching layers or placing objects).

Now, when there is no "current tile" referenced by the MapDocument, it is set based on the tile selected in the current tileset view.

Closes #3497 Closes #3681

mattj1 commented 1 month ago

This may also fix https://github.com/mapeditor/tiled/issues/3497

bjorn commented 1 month ago

Ouch, reported so long ago that @UliAbo forgot his own bug report. I'm so sorry!

UliAbo commented 1 month ago

@bjorn Thanks :D

bjorn commented 1 month ago

I've identified a minor issue with this patch, which is that it switches the "current object" (shown in Properties view) to the selected tile whenever you switch maps. I should try to find a way to suppress that.