프로젝트

일반

사용자정보

개정판 c4c2a9ed

IDc4c2a9edb19e5a27ee5e068f1295863c5ccd6698
상위 40c0b936
하위 24a9a00d, 2158c2b1

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

issue #000: add note symbol item assoc and sym attr comp item handle

Change-Id: I81cbaab9f6f81c5f41095f18b21be91bbb5bb0ef

차이점 보기:

DTI_PID/DTI_PID/Shapes/EngineeringAbstractItem.py
233 233
                        _attrs[attr] = eval(attr.Expression) if attr.Expression else ''
234 234
                    else:
235 235
                        _attrs[attr] = ''
236
                if attr.AttributeType == 'Size Text Item':
236
                elif attr.AttributeType == 'Size Text Item':
237 237
                    at = int(attr.AttrAt)
238 238
                    items = [text for text in _texts if QEngineeringAbstractItem.assoc_type(text) == attr.AttributeType]
239 239
                    if not attr.AssocItem and len(items) > at:
......
243 243
                    else:
244 244
                        item = attr.AssocItem
245 245
                        _attrs[attr] = eval(attr.Expression) if attr.Expression and ((item and 'item' in attr.Expression) or 'self' in attr.Expression) else ''
246
                elif attr.AttributeType == 'Symbol Item':
246
                elif attr.AttributeType == 'Symbol Item' or attr.AttributeType == 'Comp Item':
247 247
                    at = int(attr.AttrAt)
248 248
                    if not attr.AssocItem and len(_symbols) > at:
249 249
                        attr.AssocItem = _symbols[at]
......
289 289
        from EngineeringValveOperCodeTextItem import QEngineeringValveOperCodeTextItem
290 290
        from QEngineeringSizeTextItem import QEngineeringSizeTextItem
291 291
        from QEngineeringTagNoTextItem import QEngineeringTagNoTextItem
292
        from EngineeringLineItem import QEngineeringLineItem
292 293

  
293 294
        _type = None
294 295

  
......
302 303
            _type = 'Text Item'
303 304
        elif type(item) is SymbolSvgItem or issubclass(type(item), SymbolSvgItem):
304 305
            _type = 'Symbol Item'
306
        elif issubclass(type(item), SymbolSvgItem) or type(item) is QEngineeringLineItem:
307
            _type = 'Comp Item'
305 308

  
306 309
        return _type
307 310

  
DTI_PID/DTI_PID/TextItemFactory.py
278 278
                    for symbol in appDocData.symbols:
279 279
                        if symbol.name in symbol_names and symbol.includes(textInfo.center):
280 280
                            item = QEngineeringNoteItem(symbol=symbol)
281
                            symbol.add_assoc_item(item)
281 282
                            break
282 283
                else:
283 284
                    item = QEngineeringNoteItem()

내보내기 Unified diff

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