mirror of
https://github.com/wassname/sloth.git
synced 2026-07-25 13:30:25 +08:00
make the item's text size independent of the scene's transformation (fixes #64)
This commit is contained in:
@@ -49,6 +49,7 @@ class BaseItem(QAbstractGraphicsShapeItem):
|
||||
self._text_item = QGraphicsTextItem(self)
|
||||
self._text_item.setPos(0, 0)
|
||||
self._text_item.setAcceptHoverEvents(False)
|
||||
self._text_item.setFlags(QGraphicsItem.ItemIgnoresTransformations)
|
||||
self._text_item.setHtml(self._compile_text())
|
||||
self._valid = True
|
||||
|
||||
|
||||
Reference in New Issue
Block a user