Fixed annoying bug that would cause current tile to be disselected when editing name/category

This commit is contained in:
Brendan Robert
2015-05-15 00:08:13 -05:00
parent 1c7b1159be
commit 2049cb0756

View File

@@ -229,6 +229,7 @@ public class TileEditorTabControllerImpl extends TileEditorTabController {
@Override
public void rebuildTileSelectors() {
Tile t = getCurrentTile();
tileSelector.getItems().clear();
List<Tile> allTiles = Application.gameData.getTile();
allTiles.sort((Tile o1, Tile o2) -> {
@@ -240,5 +241,6 @@ public class TileEditorTabControllerImpl extends TileEditorTabController {
});
tileSelector.getItems().addAll(allTiles);
tileSelector.getSelectionModel().select(allTiles.indexOf(getCurrentTile()));
setCurrentTile(t);
}
}