mapeditor / mapeditor/tiled

Rename object selection functions in map document.

Open
#660 2 comments 0 reactions 0 assignees View on GitHub
refactoring
Dominant language
C++
Stars
12.9k
Forks
2k
Avg merge
4h 27m
Merged PRs (30d)
8

Description

In the map document we have the following functions:

```
setSelectedObjects // wants MapObject
selectedObjects // returns MapObject
currentObject // returns Object
setCurrentObject // wants Object
currentObjects // returns Object
setTileSelection // relates to selection on the map
tileSelection
setSelectedTiles // relates to selection on the tileset dock
selectedTiles
```

So I'm thinking that some of these should be more specific in their names. For instance `selectedObjects` should be called `selectedMapObjects`. This might change a lot of stuff though, and it's not that bad.

I'm mostly concerned with the tile selection functions I think it makes sense that `tileSelection` returns the selected area on the map rather than the area from the dock. But I'm not sure on what to call `selectedTiles`.

Contributor guide

Open the contributing guide

Research direction

Start by locating the map document declarations and all usages of setSelectedObjects, selectedObjects, currentObject, currentObjects, tileSelection, and selectedTiles. Clarify which functions refer to map selection versus tileset-dock selection, then define consistent names and update every use while preserving their existing return values and inputs.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, game-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.