프로젝트

일반

사용자정보

개정판 48371578

ID483715788661f3c286c8c6294be523cb9b92c980
상위 c891962f
하위 a8df01b8, 0578c2ae

백흠경이(가) 약 5년 전에 추가함

issue #1059: 엑셀 리포트 생성 후 열기

Change-Id: Id5e09f0cdc8e4111b4aa2cc60d45792d2cd627d3

차이점 보기:

HYTOS/HYTOS/Commands/HydroCalculationCommand.py
26 26

  
27 27
        self.loops = []
28 28

  
29
    def is_loop_start_item(self, item):
30
        """check given item is possible of start of loop"""
31

  
32
        if self.is_loop_end_item(item):
33
            matches = [conn for conn in item.connectors if conn.connectedItem and int(conn.connectedItem._conn_index) == 1]
34
            if matches:
35
                return True
36

  
37
        return False
38

  
29 39
    def is_loop_end_item(self, item):
30 40
        """check given item is possible of end of loop"""
31 41

  
......
41 51
        try:
42 52
            pressurized = [item for item in self.imageViewer.scene.items() if type(item) is SymbolSvgItem and
43 53
                           self.is_loop_end_item(item)]
54

  
44 55
            for item in pressurized:
45 56
                matches = [conn for conn in item.connectors if
46 57
                           conn.connectedItem and int(conn.connectedItem._conn_index) == 1]
HYTOS/HYTOS/MainWindow.py
924 924

  
925 925
                            col_no += 1
926 926

  
927
                    wb.save(filename=name)
927
                    name_without_ext, ext = os.path.splitext(name)
928
                    save_file_name = name if ext.upper() == '.XLSX' else name + '.xlsx'
929
                    wb.save(filename=save_file_name)
930

  
931
                    os.startfile(save_file_name)
928 932

  
929 933
                    QMessageBox.information(self, self.tr('Information'), self.tr('Report is done'))
930 934
        except Exception as ex:
HYTOS/HYTOS/Shapes/SymbolSvgItem.py
260 260
        from App import App
261 261

  
262 262
        try:
263
            # index가 없을때(사용자 생성시) 같은 이름의 심볼 인덱스의 최대값 + 1을 index로 설정
263 264
            if not index:
264 265
                matches = [item for item in App.mainWnd().graphicsView.scene.items()
265 266
                           if type(item) is SymbolSvgItem and item.name == name]
266 267
                if matches:
267 268
                    matches.sort(key=lambda item: item.index)
268 269
                    index = matches[-1].index + 1
270
                else:
271
                    index = 1
269 272

  
270 273
            self.name = name
271 274
            self.index = index

내보내기 Unified diff

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