개정판 4c3acf29
grid test
Change-Id: I3e4ef6ac4a540343f29162dd7a5ee0e7b8dcf6f8
DTI_PID/DTI_PID/QtImageViewer.py | ||
---|---|---|
736 | 736 |
elif not strict: |
737 | 737 |
svg.angle = angle if angle else 0.0 |
738 | 738 |
svg.flip = flip if flip else 0 |
739 |
svg.loc = [round(scenePos.x() - svg.symbolOrigin[0], 1), round(scenePos.y() - svg.symbolOrigin[1], 1)] |
|
740 | 739 |
configs = AppDocData.instance().getConfigs('Data', 'Grid') |
741 | 740 |
grid = int(configs[0].value) if 1 == len(configs) else -1 |
741 |
svg.loc = [round(scenePos.x() - svg.symbolOrigin[0], 1), round(scenePos.y() - svg.symbolOrigin[1], 1)] |
|
742 | 742 |
if grid == 1: |
743 | 743 |
svg.origin = [round(scenePos.x()), round(scenePos.y())] |
744 |
svg.loc = [round(scenePos.x() - svg.symbolOrigin[0]), round(scenePos.y() - svg.symbolOrigin[1])] |
|
744 | 745 |
else: |
745 | 746 |
svg.origin = [round(scenePos.x(), 1), round(scenePos.y(), 1)] |
747 |
svg.loc = [round(scenePos.x() - svg.symbolOrigin[0], 1), round(scenePos.y() - svg.symbolOrigin[1], 1)] |
|
746 | 748 |
if len(svg.connectors) == 1: |
747 | 749 |
# single connection item assistant |
748 | 750 |
connectors = [connector for connector in connectors if connector.parentItem() is not svg and not connector.connectedItem] |
내보내기 Unified diff