92 if ext and lexer: |
92 if ext and lexer: |
93 itmList = self.editorLexerList.findItems( |
93 itmList = self.editorLexerList.findItems( |
94 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
94 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
95 if itmList: |
95 if itmList: |
96 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
96 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
97 itm = self.editorLexerList.takeTopLevelItem(index) |
97 itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ |
98 del itm |
98 del itm |
99 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
99 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
100 self.editorFileExtEdit.clear() |
100 self.editorFileExtEdit.clear() |
101 self.editorLexerCombo.setCurrentIndex(0) |
101 self.editorLexerCombo.setCurrentIndex(0) |
102 self.pygmentsLexerCombo.setCurrentIndex(0) |
102 self.pygmentsLexerCombo.setCurrentIndex(0) |
111 list. |
111 list. |
112 """ |
112 """ |
113 itmList = self.editorLexerList.selectedItems() |
113 itmList = self.editorLexerList.selectedItems() |
114 if itmList: |
114 if itmList: |
115 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
115 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
116 itm = self.editorLexerList.takeTopLevelItem(index) |
116 itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ |
117 del itm |
117 del itm |
118 |
118 |
119 self.editorLexerList.clearSelection() |
119 self.editorLexerList.clearSelection() |
120 self.editorFileExtEdit.clear() |
120 self.editorFileExtEdit.clear() |
121 self.editorLexerCombo.setCurrentIndex(0) |
121 self.editorLexerCombo.setCurrentIndex(0) |