Fix remaining PyQt6 compatibility issues. Fixes #3822

This commit is contained in:
grossmj
2026-05-08 13:00:37 +08:00
parent 2c64f83d05
commit 86be15d474
2 changed files with 6 additions and 1 deletions

View File

@@ -106,6 +106,11 @@ class DrawingItem:
"""
if error:
if "doesn't exist" in result.get("message", ""):
log.warning("Drawing not found on server, recreating: {}".format(self._id))
self._id = None
self.create()
return True
log.error("Error while updating drawing: {}".format(result["message"]))
return False
self.setPos(QtCore.QPointF(result["x"], result["y"]))

View File

@@ -132,7 +132,7 @@ class TextItem(QtWidgets.QGraphicsTextItem, DrawingItem):
text.set("text-decoration", "underline")
text.set("fill", "#" + hex(self.defaultTextColor().rgba())[4:])
text.set("fill-opacity", str(self.defaultTextColor().alphaF()))
text.text = self.toPlainText()
text.text = self.toPlainText() or " "
svg = ET.tostring(svg, encoding="utf-8").decode("utf-8")
return svg