개정판 fea9e6fb
issue #1652: EngineeringCloudItem 불러오기/저장 오류 수정
Change-Id: I7e3a4c0d61ad8ec4a722902550bccbc3c859a608
HYTOS/HYTOS/Scripts/DocVer_3.4.4.0.sql | ||
---|---|---|
1 |
ALTER TABLE Components ADD COLUMN Transform [REAL] DEFAULT '1,0,0,0,1,0,0,0,1'; |
|
1 |
ALTER TABLE Components ADD COLUMN Transform [TEXT] DEFAULT '1,0,0,0,1,0,0,0,1'; |
HYTOS/HYTOS/Shapes/EngineeringCloudItem.py | ||
---|---|---|
164 | 164 |
start_x = componentInfos[0]['Comp_X'] # X@Components |
165 | 165 |
start_y = componentInfos[0]['Comp_Y'] # Y@Components |
166 | 166 |
angle = componentInfos[0]['Rotation'] # Rotation@Components |
167 |
#trans = componentInfos[0]['Transform'] # Transform@Components |
|
168 | 167 |
end_x, end_y = componentInfos[0]['X'], componentInfos[0]['Y'] |
169 | 168 |
|
170 | 169 |
pos = QPointF(float(start_x), float(start_y)) |
... | ... | |
178 | 177 |
|
179 | 178 |
except Exception as ex: |
180 | 179 |
from App import App |
181 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
182 |
sys.exc_info()[-1].tb_lineno)
|
|
180 |
message = f'error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:' \
|
|
181 |
f'{sys.exc_info()[-1].tb_lineno}'
|
|
183 | 182 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
184 | 183 |
|
185 | 184 |
return item |
... | ... | |
212 | 211 |
except Exception as ex: |
213 | 212 |
from App import App |
214 | 213 |
|
215 |
message = 'error occurred({}) in {}:{}'.format(ex, sys.exc_info()[-1].tb_frame.f_code.co_filename,
|
|
216 |
sys.exc_info()[-1].tb_lineno)
|
|
214 |
message = f'error occurred({repr(ex)}) in {sys.exc_info()[-1].tb_frame.f_code.co_filename}:' \
|
|
215 |
f'{sys.exc_info()[-1].tb_lineno}'
|
|
217 | 216 |
App.mainWnd().addMessage.emit(MessageType.Error, message) |
218 | 217 |
|
219 |
return res |
|
218 |
return res |
HYTOS/HYTOS/Shapes/SymbolSvgItem.py | ||
---|---|---|
1388 | 1388 |
|
1389 | 1389 |
return super().itemChange(change, value) |
1390 | 1390 |
|
1391 |
''' |
|
1392 |
@brief remove item when user press delete key |
|
1393 |
@author humkyung |
|
1394 |
@date 2018.04.23 |
|
1395 |
@history 2018.05.17 Jeongwoo Add if-statement and move 'break' |
|
1396 |
2018.05.25 Jeongwoo Seperate delete item method |
|
1397 |
''' |
|
1398 |
|
|
1399 | 1391 |
def keyPressEvent(self, event): |
1392 |
"""handle event when user press delete key or ' key""" |
|
1400 | 1393 |
if self.isSelected(): |
1401 | 1394 |
if event.key() == Qt.Key_Delete: |
1402 |
self.transfer.onRemoved.emit(self) |
|
1395 |
return self.transfer.onRemoved.emit(self)
|
|
1403 | 1396 |
elif event.key() == Qt.Key_QuoteLeft: |
1404 |
self.mouseDoubleClickEvent(event) |
|
1405 |
else: |
|
1406 |
QGraphicsSvgItem.keyPressEvent(self, event) |
|
1407 |
'''if not self.isSelected(): return |
|
1397 |
return self.mouseDoubleClickEvent(event) |
|
1408 | 1398 |
|
1409 |
if event.key() == Qt.Key_Delete: |
|
1410 |
self.deleteSvgItemFromScene() |
|
1411 |
elif event.key() == Qt.Key_QuoteLeft: |
|
1412 |
self.mouseDoubleClickEvent(event)''' |
|
1399 |
QGraphicsSvgItem.keyPressEvent(self, event) |
|
1413 | 1400 |
|
1414 | 1401 |
''' |
1415 | 1402 |
@brief Double click event, Show rotate symbol dialog |
내보내기 Unified diff