code to show profile again

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
Tomaz Canabrava 2013-05-14 08:18:26 -03:00
parent 5868b37e6b
commit b0374047dd
5 changed files with 39 additions and 8 deletions

View file

@ -42,6 +42,15 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()),
ui->ListWidget->setCurrentIndex(sortModel->index(0,0, firstDiveOrTrip));
else
ui->ListWidget->setCurrentIndex(firstDiveOrTrip);
connect(ui->ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
}
void MainWindow::current_dive_changed(int divenr)
{
select_dive(divenr);
redrawProfile();
ui->InfoWidget->updateDiveInfo(divenr);
}
void MainWindow::redrawProfile()