E4Gui/E4TreeView.py

changeset 37
bfe92e414977
parent 13
1af94a91f439
equal deleted inserted replaced
36:835407b77a50 37:bfe92e414977
36 not self.selectionModel().hasSelection(): 36 not self.selectionModel().hasSelection():
37 # no models available or nothing selected 37 # no models available or nothing selected
38 return 38 return
39 39
40 selectedRows = self.selectionModel().selectedRows() 40 selectedRows = self.selectionModel().selectedRows()
41 for idx in reversed(selectedRows): 41 for idx in reversed(sorted(selectedRows)):
42 self.model().removeRow(idx.row(), idx.parent()) 42 self.model().removeRow(idx.row(), idx.parent())
43 43
44 def removeAll(self): 44 def removeAll(self):
45 """ 45 """
46 Public method to clear the view. 46 Public method to clear the view.

eric ide

mercurial