Close SnapshotsDialog when database restaured and fix a bug : forgot to delete panel in wxUI::LoadPanels

This commit is contained in:
Grégory Soutadé 2012-04-28 10:55:04 +02:00
parent 43bf2da1f5
commit deddbc040c
2 changed files with 3 additions and 0 deletions

View File

@ -183,6 +183,8 @@ void SnapshotsDialog::OnBackTo()
_kiss->LoadUser(user); _kiss->LoadUser(user);
QMessageBox::information(0, "KissCount", _("Welcome back to ") + filename); QMessageBox::information(0, "KissCount", _("Welcome back to ") + filename);
close();
} }
void SnapshotsDialog::OnOK() void SnapshotsDialog::OnOK()

View File

@ -212,6 +212,7 @@ void wxUI::LoadPanels()
{ {
temp = _panels[i]->CreatePanel(); temp = _panels[i]->CreatePanel();
_buttons[i]->disconnect(&_signalMapper, SLOT(map())); _buttons[i]->disconnect(&_signalMapper, SLOT(map()));
delete _panels[i];
_panels[i] = temp; _panels[i] = temp;
connect(_buttons[i], SIGNAL(clicked()), &_signalMapper, SLOT(map())); connect(_buttons[i], SIGNAL(clicked()), &_signalMapper, SLOT(map()));
_buttons[i]->setToolTip(temp->GetToolTip()); _buttons[i]->setToolTip(temp->GetToolTip());