SVGExport: Initialize option.exposedRect for items that use it
This commit is contained in:
parent
3d3d0a2459
commit
56950479f9
|
@ -180,7 +180,10 @@ def _generateItemSvg(item, nodes=None, root=None, options={}):
|
||||||
item.setExportMode(True, {'painter': p})
|
item.setExportMode(True, {'painter': p})
|
||||||
try:
|
try:
|
||||||
p.setTransform(tr)
|
p.setTransform(tr)
|
||||||
item.paint(p, QtGui.QStyleOptionGraphicsItem(), None)
|
opt = QtGui.QStyleOptionGraphicsItem()
|
||||||
|
if item.flags() & QtGui.QGraphicsItem.ItemUsesExtendedStyleOption:
|
||||||
|
opt.exposedRect = item.boundingRect()
|
||||||
|
item.paint(p, opt, None)
|
||||||
finally:
|
finally:
|
||||||
p.end()
|
p.end()
|
||||||
## Can't do this here--we need to wait until all children have painted as well.
|
## Can't do this here--we need to wait until all children have painted as well.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user