개정판 8b1a59d5
issue #000: fix note symbol road from xml
Change-Id: I0657041da96f2d29a0a33ffbfe62693b4126b9c7
DTI_PID/DTI_PID/Commands/ZoomCommand.py | ||
---|---|---|
54 | 54 |
scenePos1 = self.imageViewer.mapToScene(pos.x() - 300, pos.y() - 300) |
55 | 55 |
scenePos2 = self.imageViewer.mapToScene(pos.x() + 300, pos.y() + 300) |
56 | 56 |
if isZoomIn: |
57 |
print("zoom in") |
|
57 |
#print("zoom in")
|
|
58 | 58 |
zoomArea = QRectF(QPointF(scenePos1.x(), scenePos1.y()), QPointF(scenePos2.x(), scenePos2.y())) |
59 | 59 |
viewBBox = self.imageViewer.zoomStack[-1] if len(self.imageViewer.zoomStack) else self.imageViewer.sceneRect() |
60 | 60 |
selectionBBox = zoomArea.intersected(viewBBox) |
... | ... | |
63 | 63 |
self.imageViewer.zoomStack.append(selectionBBox) |
64 | 64 |
self.imageViewer.updateViewer() |
65 | 65 |
else: |
66 |
print("zoom out") |
|
66 |
#print("zoom out")
|
|
67 | 67 |
self.imageViewer.scene.setSelectionArea(QPainterPath()) # Clear current selection area. |
68 | 68 |
if len(self.imageViewer.zoomStack): |
69 | 69 |
self.imageViewer.zoomStack.pop() |
DTI_PID/DTI_PID/MainWindow.py | ||
---|---|---|
2265 | 2265 |
item = SymbolSvgItem.fromXml(symbol) |
2266 | 2266 |
if item is not None: |
2267 | 2267 |
item.transfer.onRemoved.connect(self.itemRemoved) |
2268 |
symbols.append(item) |
|
2268 |
symbols.append(item) |
|
2269 |
docData.symbols.append(item) |
|
2270 |
self.addSvgItemToScene(item) |
|
2269 | 2271 |
else: |
2270 | 2272 |
pt = [float(x) for x in symbol.find('LOCATION').text.split(',')] |
2271 | 2273 |
size = [float(x) for x in symbol.find('SIZE').text.split(',')] |
... | ... | |
2339 | 2341 |
|
2340 | 2342 |
QApplication.processEvents() |
2341 | 2343 |
|
2342 |
""" add symbol to scene and tree widget """
|
|
2344 |
""" add tree widget """ |
|
2343 | 2345 |
for item in symbols: |
2344 |
self.addSvgItemToScene(item) |
|
2345 |
docData.symbols.append(item) |
|
2346 | 2346 |
self.itemTreeWidget.addTreeItem(self.itemTreeWidget.root, item) |
2347 | 2347 |
|
2348 | 2348 |
for line_no_node in root.find('LINENOS').iter('LINE_NO'): |
내보내기 Unified diff