개정판 06848dae
issue #1366: recognition ratio added on xml
Change-Id: I069f3e5972d72461778df41bc897b10d75c40e22
DTI_PID/DTI_PID/Shapes/SymbolSvgItem.py | ||
---|---|---|
1286 | 1286 |
flipNode.text = str(self.flip) |
1287 | 1287 |
node.append(flipNode) |
1288 | 1288 |
|
1289 |
if self.hit_ratio: |
|
1290 |
ratioNode = Element('RATIO') |
|
1291 |
ratioNode.text = str(self.hit_ratio) |
|
1292 |
node.append(ratioNode) |
|
1293 |
|
|
1289 | 1294 |
properties_node = Element('PROPERTIES') |
1290 | 1295 |
for prop, value in self.properties.items(): |
1291 | 1296 |
prop_node = prop.toXml() |
... | ... | |
1521 | 1526 |
flipLabelNode = node.find('FLIP') |
1522 | 1527 |
flipLabel = int(flipLabelNode.text) if flipLabelNode is not None else 0 |
1523 | 1528 |
|
1529 |
ratioNode = node.find('RATIO') |
|
1530 |
hit_ratio = float(ratioNode.text) if ratioNode is not None else None |
|
1531 |
|
|
1524 | 1532 |
project = appDocData.getCurrentProject() |
1525 | 1533 |
svgFilePath = os.path.join(project.getSvgFilePath(), _type, name + '.svg') |
1526 | 1534 |
if os.path.isfile(svgFilePath): |
... | ... | |
1536 | 1544 |
if symbolInfo: |
1537 | 1545 |
childSymbol = symbolInfo.additionalSymbol |
1538 | 1546 |
|
1547 |
if hit_ratio: |
|
1548 |
item.hit_ratio = hit_ratio |
|
1549 |
|
|
1539 | 1550 |
if item.buildItem(name, _type, angle, pt, size, origin, connPts, baseSymbol, childSymbol, |
1540 | 1551 |
hasInstrumentLabel, dbUid=dbUid): |
1541 | 1552 |
pass |
내보내기 Unified diff