QScintilla/EditorAssembly.py

changeset 1474
1eaec11a0078
parent 1439
953d3f95ee4d
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1471:af9e4f5a34b5 1474:1eaec11a0078
88 # step 1: go to the line of the selected entry 88 # step 1: go to the line of the selected entry
89 lineno = self.__globalsCombo.itemData(index) 89 lineno = self.__globalsCombo.itemData(index)
90 if lineno is not None: 90 if lineno is not None:
91 txt = self.__editor.text(lineno - 1).rstrip() 91 txt = self.__editor.text(lineno - 1).rstrip()
92 pos = len(txt.replace(txt.strip(), "")) 92 pos = len(txt.replace(txt.strip(), ""))
93 self.__editor.gotoLine(lineno, pos if pos == 0 else pos +1) 93 self.__editor.gotoLine(lineno, pos if pos == 0 else pos + 1)
94 self.__editor.setFocus() 94 self.__editor.setFocus()
95 95
96 # step 2: populate the members combo, if the entry is a class 96 # step 2: populate the members combo, if the entry is a class
97 self.__membersCombo.clear() 97 self.__membersCombo.clear()
98 entryName = self.__globalsCombo.itemText(index) 98 entryName = self.__globalsCombo.itemText(index)
145 """ 145 """
146 lineno = self.__membersCombo.itemData(index) 146 lineno = self.__membersCombo.itemData(index)
147 if lineno is not None: 147 if lineno is not None:
148 txt = self.__editor.text(lineno - 1).rstrip() 148 txt = self.__editor.text(lineno - 1).rstrip()
149 pos = len(txt.replace(txt.strip(), "")) 149 pos = len(txt.replace(txt.strip(), ""))
150 self.__editor.gotoLine(lineno, pos if pos == 0 else pos +1) 150 self.__editor.gotoLine(lineno, pos if pos == 0 else pos + 1)
151 self.__editor.setFocus() 151 self.__editor.setFocus()
152 152
153 def __resetParseTimer(self): 153 def __resetParseTimer(self):
154 """ 154 """
155 Private slot to reset the parse timer. 155 Private slot to reset the parse timer.

eric ide

mercurial