Merge pull request #718 from ales-erjavec/svg-export-exposed-rect
SVGExport: Initialize option.exposedRect for items that use it
This commit is contained in:
commit
ada79bffde
@ -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