84 if ext and lexer: |
84 if ext and lexer: |
85 itmList = self.editorLexerList.findItems( |
85 itmList = self.editorLexerList.findItems( |
86 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
86 ext, Qt.MatchFlags(Qt.MatchExactly), 0) |
87 if itmList: |
87 if itmList: |
88 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
88 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
89 itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ |
89 itm = self.editorLexerList.takeTopLevelItem(index) |
|
90 # __IGNORE_WARNING__ |
90 del itm |
91 del itm |
91 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
92 QTreeWidgetItem(self.editorLexerList, [ext, lexer]) |
92 self.editorFileExtEdit.clear() |
93 self.editorFileExtEdit.clear() |
93 self.editorLexerCombo.setCurrentIndex(0) |
94 self.editorLexerCombo.setCurrentIndex(0) |
94 self.pygmentsLexerCombo.setCurrentIndex(0) |
95 self.pygmentsLexerCombo.setCurrentIndex(0) |
103 list. |
104 list. |
104 """ |
105 """ |
105 itmList = self.editorLexerList.selectedItems() |
106 itmList = self.editorLexerList.selectedItems() |
106 if itmList: |
107 if itmList: |
107 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
108 index = self.editorLexerList.indexOfTopLevelItem(itmList[0]) |
108 itm = self.editorLexerList.takeTopLevelItem(index) # __IGNORE_WARNING__ |
109 itm = self.editorLexerList.takeTopLevelItem(index) |
|
110 # __IGNORE_WARNING__ |
109 del itm |
111 del itm |
110 |
112 |
111 self.editorLexerList.clearSelection() |
113 self.editorLexerList.clearSelection() |
112 self.editorFileExtEdit.clear() |
114 self.editorFileExtEdit.clear() |
113 self.editorLexerCombo.setCurrentIndex(0) |
115 self.editorLexerCombo.setCurrentIndex(0) |