Merge pull request #894 from j9ac9k/fix-svg-export

Simpler way of extracting types from QByteArray
This commit is contained in:
Kenneth Lyons 2019-05-27 17:55:07 -07:00 committed by GitHub
commit 08e92adcaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -190,12 +190,7 @@ def _generateItemSvg(item, nodes=None, root=None, options={}):
## this is taken care of in generateSvg instead.
#if hasattr(item, 'setExportMode'):
#item.setExportMode(False)
if QT_LIB in ['PySide', 'PySide2']:
xmlStr = str(arr)
else:
xmlStr = bytes(arr).decode('utf-8')
doc = xml.parseString(xmlStr.encode('utf-8'))
doc = xml.parseString(arr.data())
try:
## Get top-level group for this item