Debugger/VariablesFilterDialog.py

branch
6_1_x
changeset 5167
475f5f1a052c
parent 4632
ca310db386ed
child 5171
f1e9eebd5469
equal deleted inserted replaced
5164:197acc53a662 5167:475f5f1a052c
62 @return A tuple of lists of integer values. The first list is the 62 @return A tuple of lists of integer values. The first list is the
63 locals variables filter, the second the globals variables filter. 63 locals variables filter, the second the globals variables filter.
64 """ 64 """
65 lList = [] 65 lList = []
66 gList = [] 66 gList = []
67 for i in range(self.localsList.count()): 67 for row in range(self.localsList.count()):
68 itm = self.localsList.item(i) 68 itm = self.localsList.item(row)
69 if itm.isSelected(): 69 if itm.isSelected():
70 lList.append(i) 70 lList.append(row)
71 for i in range(self.globalsList.count()): 71 for row in range(self.globalsList.count()):
72 itm = self.globalsList.item(i) 72 itm = self.globalsList.item(row)
73 if itm.isSelected(): 73 if itm.isSelected():
74 gList.append(i) 74 gList.append(row)
75 return (lList, gList) 75 return (lList, gList)
76 76
77 def setSelection(self, lList, gList): 77 def setSelection(self, lList, gList):
78 """ 78 """
79 Public slot to set the current selection. 79 Public slot to set the current selection.
80 80
81 @param lList local variables filter (list of int) 81 @param lList local variables filter (list of int)
82 @param gList global variables filter (list of int) 82 @param gList global variables filter (list of int)
83 """ 83 """
84 for filterIndex in lList: 84 for row in range(self.localsList.count()):
85 itm = self.localsList.item(filterIndex) 85 itm = self.localsList.item(row)
86 itm.setSelected(True) 86 itm.setSelected(row in lList)
87 for filterIndex in gList: 87 for row in range(self.globalsList.count()):
88 itm = self.globalsList.item(filterIndex) 88 itm = self.globalsList.item(row)
89 itm.setSelected(True) 89 itm.setSelected(row in gList)
90 90
91 def on_buttonBox_clicked(self, button): 91 def on_buttonBox_clicked(self, button):
92 """ 92 """
93 Private slot called by a button of the button box clicked. 93 Private slot called by a button of the button box clicked.
94 94

eric ide

mercurial