Skip to content

Commit fc1116d

Browse files
committed
Rotate point object label positions too.
1 parent 0c8f53c commit fc1116d

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

src/tiled/objectselectionitem.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -202,13 +202,7 @@ void MapObjectLabel::syncWithMapObject(const MapRenderer &renderer)
202202
bounds = rotateAt(pos, mObject->rotation()).mapRect(bounds);
203203

204204
// Center the object name on the object bounding box
205-
if (mObject->shape() == MapObject::Point) {
206-
// Use a local offset, since point objects don't scale with the view
207-
boundingRect.translate(0, -bounds.height());
208-
mTextPos.ry() -= bounds.height();
209-
} else {
210-
pos = { (bounds.left() + bounds.right()) / 2, bounds.top() };
211-
}
205+
pos = { (bounds.left() + bounds.right()) / 2, bounds.top() };
212206

213207
if (auto mapScene = static_cast<MapScene*>(scene()))
214208
pos += mapScene->absolutePositionForLayer(*mObject->objectGroup());

0 commit comments

Comments
 (0)