correctly handle reload after backends configuration

This commit is contained in:
Romain Bignon 2010-08-03 20:18:34 +02:00
commit bf0f1d94b1
5 changed files with 20 additions and 7 deletions

View file

@ -102,8 +102,15 @@ class AccountsStatus(QWidget):
self.setLayout(QVBoxLayout())
def load(self):
while self.layout().count() > 0:
item = self.layout().takeAt(0)
if item.widget():
item.widget().hide()
item.widget().deleteLater()
for backend in self.weboob.iter_backends():
account = Account(weboob, backend)
account = Account(self.weboob, backend)
self.layout().addWidget(account)
self.layout().addStretch()