mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add a method to update the dive pictures on the model.
Call that method from the mainWindow when the dive changes. The updateDivePictures walks around the events of the first dc (since all pictures are distributed allong all dive computers) to get the events of type '123' (I wonder if there's not a better way to save pictures on the dive, like an linked list of char* named pictures.) Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
4b520a8fbc
commit
e140703d34
4 changed files with 42 additions and 2 deletions
|
@ -59,7 +59,8 @@ MainWindow::MainWindow() : QMainWindow(),
|
|||
yearlyStatsModel(0),
|
||||
state(VIEWALL),
|
||||
updateManager(0),
|
||||
fakeDiveId(0)
|
||||
fakeDiveId(0),
|
||||
divePictureModel(new DivePictureModel(this))
|
||||
{
|
||||
Q_ASSERT_X(m_Instance == NULL, "MainWindow", "MainWindow recreated!");
|
||||
m_Instance = this;
|
||||
|
@ -165,6 +166,7 @@ void MainWindow::current_dive_changed(int divenr)
|
|||
*/
|
||||
ui.newProfile->plotDives(QList<dive *>() << (current_dive));
|
||||
ui.InfoWidget->updateDiveInfo(divenr);
|
||||
divePictureModel->updateDivePictures(divenr);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionNew_triggered()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue