76 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
76 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
77 if itmList: |
77 if itmList: |
78 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
78 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
79 itm = self.editorLexerList.takeTopLevelItem(index) |
79 itm = self.editorLexerList.takeTopLevelItem(index) |
80 del itm |
80 del itm |
81 itm = QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
81 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
82 self.editorFileExtEdit.clear() |
82 self.editorFileExtEdit.clear() |
83 self.editorLexerCombo.setCurrentIndex(0) |
83 self.editorLexerCombo.setCurrentIndex(0) |
84 self.pygmentsLexerCombo.setCurrentIndex(0) |
84 self.pygmentsLexerCombo.setCurrentIndex(0) |
85 self.editorLexerList.sortItems(self.editorLexerList.sortColumn(), |
85 self.editorLexerList.sortItems(self.editorLexerList.sortColumn(), |
86 self.editorLexerList.header().sortIndicatorOrder()) |
86 self.editorLexerList.header().sortIndicatorOrder()) |