프로젝트

일반

사용자정보

개정판 a7cceae9

IDa7cceae9d4a22ffacd8836258ebc47ed4585fe34
상위 af2e60f2
하위 340bf987

함의성이(가) 2년 이상 전에 추가함

size fix

Change-Id: I0580e2622f038ee3469e9b033ddc0cf093d1aca0

차이점 보기:

DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py
405 405
                        return ''
406 406
                        #return AppDocData.instance().drain_size
407 407

  
408
                if self in self.owner.runs[0].items:
408
                if self.owner.runs and self in self.owner.runs[0].items:
409 409
                    self.sizeDepth = 0
410 410
                    return self.owner.Size 
411 411
                elif self.sizeDepth < 2:
412 412
                    matches = [run for run in self.owner.runs if self in run.items]
413
                    if type(matches[0].items[0]) is QEngineeringLineItem:
414
                        _item = matches[0].items[0]
415
                        connectedItems = [conn.connectedItem for conn in _item.connectors if conn._connected_at == QEngineeringAbstractItem.CONNECTED_AT_PT and \
416
                                                                                                        conn.connectedItem and conn.connectedItem not in matches[0].items]
417
                        if connectedItems:
418
                            connectedItems[0].sizeDepth = self.sizeDepth + 1
419
                            res  = connectedItems[0].EvaluatedSize
420
                            if res:
421
                                self.sizeDepth = 0
422
                                return res
423
                    if type(matches[0].items[-1]) is QEngineeringLineItem:
424
                        _item = matches[0].items[-1]
425
                        connectedItems = [conn.connectedItem for conn in _item.connectors if conn._connected_at == QEngineeringAbstractItem.CONNECTED_AT_PT and \
426
                                                                                                        conn.connectedItem and conn.connectedItem not in matches[0].items]
427
                        if connectedItems:
428
                            connectedItems[0].sizeDepth = self.sizeDepth + 1
429
                            res  = connectedItems[0].EvaluatedSize
430
                            if res:
431
                                self.sizeDepth = 0
432
                                return res
433
                    if issubclass(type(matches[0].items[0]), SymbolSvgItem):
434
                        _item = matches[0].items[0]
435
                        connectedItems = [_item.connectors[index].connectedItem for index in range(len(_item.conn_type)) if (_item.conn_type[index] == 'Secondary' or _item.conn_type[index] == 'Primary') and \
436
                                                                                                        _item.connectors[index].connectedItem and _item.connectors[index].connectedItem not in matches[0].items]
437
                        if connectedItems:
438
                            connectedItems[0].sizeDepth = self.sizeDepth + 1
439
                            res  = connectedItems[0].EvaluatedSize
440
                            if res:
441
                                self.sizeDepth = 0
442
                                return res
443
                    if issubclass(type(matches[0].items[-1]), SymbolSvgItem):
444
                        _item = matches[0].items[-1]
445
                        connectedItems = [_item.connectors[index].connectedItem for index in range(len(_item.conn_type)) if (_item.conn_type[index] == 'Secondary' or _item.conn_type[index] == 'Primary') and \
446
                                                                                                        _item.connectors[index].connectedItem and _item.connectors[index].connectedItem not in matches[0].items]
447
                        if connectedItems:
448
                            connectedItems[0].sizeDepth = self.sizeDepth + 1
449
                            res  = connectedItems[0].EvaluatedSize
450
                            if res:
451
                                self.sizeDepth = 0
452
                                return res
453
                    if type(matches[0].items[0]) is QEngineeringLineItem:
454
                        _item = matches[0].items[0]
455
                        connectedItems = [conn.connectedItem for conn in _item.connectors if conn.connectedItem and conn.connectedItem not in matches[0].items]
456
                        if connectedItems:
457
                            connectedItems[0].sizeDepth = self.sizeDepth + 1
458
                            res  = connectedItems[0].EvaluatedSize
459
                            if res:
460
                                self.sizeDepth = 0
461
                                return res
462
                    if type(matches[0].items[-1]) is QEngineeringLineItem:
463
                        _item = matches[0].items[-1]
464
                        connectedItems = [conn.connectedItem for conn in _item.connectors if conn.connectedItem and conn.connectedItem not in matches[0].items]
465
                        if connectedItems:
466
                            connectedItems[0].sizeDepth = self.sizeDepth + 1
467
                            res  = connectedItems[0].EvaluatedSize
468
                            if res:
469
                                self.sizeDepth = 0
470
                                return res
413
                    if matches:
414
                        if type(matches[0].items[0]) is QEngineeringLineItem:
415
                            _item = matches[0].items[0]
416
                            connectedItems = [conn.connectedItem for conn in _item.connectors if conn._connected_at == QEngineeringAbstractItem.CONNECTED_AT_PT and \
417
                                                                                                            conn.connectedItem and conn.connectedItem not in matches[0].items]
418
                            if connectedItems:
419
                                connectedItems[0].sizeDepth = self.sizeDepth + 1
420
                                res  = connectedItems[0].EvaluatedSize
421
                                if res:
422
                                    self.sizeDepth = 0
423
                                    return res
424
                        if type(matches[0].items[-1]) is QEngineeringLineItem:
425
                            _item = matches[0].items[-1]
426
                            connectedItems = [conn.connectedItem for conn in _item.connectors if conn._connected_at == QEngineeringAbstractItem.CONNECTED_AT_PT and \
427
                                                                                                            conn.connectedItem and conn.connectedItem not in matches[0].items]
428
                            if connectedItems:
429
                                connectedItems[0].sizeDepth = self.sizeDepth + 1
430
                                res  = connectedItems[0].EvaluatedSize
431
                                if res:
432
                                    self.sizeDepth = 0
433
                                    return res
434
                        if issubclass(type(matches[0].items[0]), SymbolSvgItem):
435
                            _item = matches[0].items[0]
436
                            connectedItems = [_item.connectors[index].connectedItem for index in range(len(_item.conn_type)) if (_item.conn_type[index] == 'Secondary' or _item.conn_type[index] == 'Primary') and \
437
                                                                                                            _item.connectors[index].connectedItem and _item.connectors[index].connectedItem not in matches[0].items]
438
                            if connectedItems:
439
                                connectedItems[0].sizeDepth = self.sizeDepth + 1
440
                                res  = connectedItems[0].EvaluatedSize
441
                                if res:
442
                                    self.sizeDepth = 0
443
                                    return res
444
                        if issubclass(type(matches[0].items[-1]), SymbolSvgItem):
445
                            _item = matches[0].items[-1]
446
                            connectedItems = [_item.connectors[index].connectedItem for index in range(len(_item.conn_type)) if (_item.conn_type[index] == 'Secondary' or _item.conn_type[index] == 'Primary') and \
447
                                                                                                            _item.connectors[index].connectedItem and _item.connectors[index].connectedItem not in matches[0].items]
448
                            if connectedItems:
449
                                connectedItems[0].sizeDepth = self.sizeDepth + 1
450
                                res  = connectedItems[0].EvaluatedSize
451
                                if res:
452
                                    self.sizeDepth = 0
453
                                    return res
454
                        if type(matches[0].items[0]) is QEngineeringLineItem:
455
                            _item = matches[0].items[0]
456
                            connectedItems = [conn.connectedItem for conn in _item.connectors if conn.connectedItem and conn.connectedItem not in matches[0].items]
457
                            if connectedItems:
458
                                connectedItems[0].sizeDepth = self.sizeDepth + 1
459
                                res  = connectedItems[0].EvaluatedSize
460
                                if res:
461
                                    self.sizeDepth = 0
462
                                    return res
463
                        if type(matches[0].items[-1]) is QEngineeringLineItem:
464
                            _item = matches[0].items[-1]
465
                            connectedItems = [conn.connectedItem for conn in _item.connectors if conn.connectedItem and conn.connectedItem not in matches[0].items]
466
                            if connectedItems:
467
                                connectedItems[0].sizeDepth = self.sizeDepth + 1
468
                                res  = connectedItems[0].EvaluatedSize
469
                                if res:
470
                                    self.sizeDepth = 0
471
                                    return res
471 472

  
472 473
            self.sizeDepth = 0
473 474
            return ''

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)