개정판 6447c667
issue #1198: HEX_H에서 루프 오류 수정(revised)
Change-Id: I0df018aeb3e4b4983392f43b41af8bf439ecbf33
HYTOS/HYTOS/Commands/HydroCalculationCommand.py | ||
---|---|---|
669 | 669 |
# end at connector |
670 | 670 |
elif loop.items[-1].connectedItem and int(loop.items[-1].connectedItem._conn_index) == 2: |
671 | 671 |
if loop.items[-1].parentItem().name in ['HEX_H']: |
672 |
target = (loop.items[-1]._conn_index + 2) // (len(loop.items[-1].parentItem().connectors) + 1) |
|
672 |
ports = {1: 3, 2: 4, 3: 1, 4: 2} |
|
673 |
target = ports[loop.items[-1]._conn_index] |
|
673 | 674 |
matches = [conn for conn in loop.items[-1].parentItem().connectors if |
674 | 675 |
(not conn in loop.items) and conn.connectedItem and conn._conn_index == target and |
675 | 676 |
int(conn.connectedItem._conn_index) == 1] |
HYTOS/HYTOS/QtImageViewer.py | ||
---|---|---|
257 | 257 |
zoomNewRect = self.zoomStack.pop() |
258 | 258 |
self.updateViewer(zoomNewRect) |
259 | 259 | |
260 |
""" |
|
260 | 261 |
def resizeEvent(self, event): |
261 |
""" Maintain current zoom on resize. """
|
|
262 |
Maintain current zoom on resize.
|
|
262 | 263 |
self.updateViewer() |
264 |
""" |
|
263 | 265 | |
264 | 266 |
''' |
265 | 267 |
@brief mouse move event |
... | ... | |
541 | 543 | |
542 | 544 |
def save_as_image(self, file_path): |
543 | 545 |
""" save scene as given file """ |
546 | ||
544 | 547 |
rect = self.sceneRect() |
545 | 548 |
size = QSize(rect.width(), rect.height()) |
546 | 549 |
image = QImage(size, QImage.Format_ARGB32_Premultiplied) |
내보내기 Unified diff