Project/ProjectBaseBrowser.py

changeset 3603
cd14023a8ac1
parent 3601
236578b22511
child 3656
441956d8fce5
equal deleted inserted replaced
3602:73cad09faca9 3603:cd14023a8ac1
595 """ 595 """
596 model = self.model() 596 model = self.model()
597 for name in names: 597 for name in names:
598 childIndex = model.index(0, 0) 598 childIndex = model.index(0, 0)
599 while childIndex.isValid(): 599 while childIndex.isValid():
600 if model.item(childIndex).name() == name: 600 try:
601 self.setExpanded(childIndex, True) 601 if model.item(childIndex).name() == name:
602 break 602 self.setExpanded(childIndex, True)
603 break
604 except AttributeError:
605 # ignore items not supporting this method
606 pass
603 childIndex = self.indexBelow(childIndex) 607 childIndex = self.indexBelow(childIndex)
604 608
605 def _prepareRepopulateItem(self, name): 609 def _prepareRepopulateItem(self, name):
606 """ 610 """
607 Protected slot to handle the prepareRepopulateItem signal. 611 Protected slot to handle the prepareRepopulateItem signal.

eric ide

mercurial