Scripting documentation: Qt.rect's additional properties, TileMap.resize()
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
(Whoops, did not mean to mark this one as a bug!)
Two documentation things, and maybe a feature request:
-
The documentation for TileMap.resize() says
This operation can currently only be applied to maps loaded from a file.
However, it works just fine on open maps that are unsaved. I suspect this is left over from when maps always had to be saved to a file to be opened as documents in Tiled. I haven't thoroughly tested it so I don't know what wording to offer. Does it work for
mapFormat.read()? If not, then perhaps appropriate wording would be "[...] maps open in Tiled as documents." If it does work for maps opened from file but not open as documents, then the wording could be "[...] maps open in Tiled as documents, or loaded from a file." -
The documentation for Qt.rect only lists its
x,y,width, andheightproperties, but it actually also hasleft,right,top,bottomproperties. These appear to be read-only - trying to set them does not update them or change the rect's other properties.
I think these should at least be documented as read-only, as they're very convenient! Better yet, if possible, they should be made settable, updating the rectangle's other properties as appropriate. QRect already has setter functions for them, e.g. https://doc.qt.io/qt-5/qrect.html#setBottom
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TileMap.resize() and Qt.rect documentation entries linked in the issue, then verify resize() behavior for unsaved maps and mapFormat.read() maps. Check which Qt.rect properties are exposed and whether they are read-only. Done means the documentation accurately describes TileMap.resize() limitations and lists the additional rect properties with their mutability.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100