개정판 a6f8277b
issue #000: change symbol copy paste
Change-Id: I436d1ab05ad5bb9ba1be41ecd0bb5b7d8f3890a6
DTI_PID/DTI_PID/QtImageViewerScene.py | ||
---|---|---|
111 | 111 |
elif event.key() == Qt.Key_V and event.modifiers() & Qt.ControlModifier: |
112 | 112 |
from App import App |
113 | 113 |
import uuid |
114 |
from QtImageViewer import QtImageViewer |
|
114 | 115 |
|
115 | 116 |
clipboard = QApplication.clipboard() |
116 | 117 |
mime_data = clipboard.mimeData() |
... | ... | |
126 | 127 |
root = ElementTree.fromstring(text) |
127 | 128 |
for symbol in root.find('SYMBOLS').iter('SYMBOL'): |
128 | 129 |
item = SymbolSvgItem.fromXml(symbol) |
130 |
svg = QtImageViewer.createSymbolObject(item.name) |
|
131 |
QtImageViewer.matchSymbolToLine(self, svg, origin) |
|
132 |
''' |
|
129 | 133 |
# uid 새로 할당 |
130 | 134 |
item.uid = uuid.uuid4() |
131 | 135 |
for connector in item.connectors: |
... | ... | |
134 | 138 |
item.transfer.onRemoved.connect(App.mainWnd().itemRemoved) |
135 | 139 |
item.addSvgItemToScene(self, True) |
136 | 140 |
item.setVisible(True) |
141 |
''' |
|
137 | 142 |
elif event.key() == Qt.Key_Z and event.modifiers() & Qt.ControlModifier: |
138 | 143 |
self._undo_stack.undo() |
139 | 144 |
elif event.key() == Qt.Key_Y and event.modifiers() & Qt.ControlModifier: |
내보내기 Unified diff