Changeset 7aac385 in subsurface


Ignore:
Timestamp:
Apr 26, 2017, 8:45:34 AM (5 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
8c5c022
Parents:
c4d6055
git-author:
Tomaz Canabrava <tcanabrava@…> (04/26/17 08:30:08)
git-committer:
Dirk Hohndel <dirk@…> (04/26/17 08:45:34)
Message:

Fix saving table size

We need to make sure the model is avaliable for the table
until it hits the destructor.

Fixes #347

Signed-off-by: Tomaz Canabrava <tcanabrava@…>
Signed-off-by: Dirk Hohndel <dirk@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/tab-widgets/maintab.cpp

    rbea1217 r7aac385  
    5959        memset(&displayed_dive, 0, sizeof(displayed_dive));
    6060        memset(&displayedTrip, 0, sizeof(displayedTrip));
     61
     62        // This makes sure we only delete the models
     63        // after the destructor of the tables,
     64        // this is needed to save the column sizes.
     65        cylindersModel->setParent(ui.cylinders);
     66        weightModel->setParent(ui.weights);
    6167
    6268        ui.cylinders->setModel(cylindersModel);
Note: See TracChangeset for help on using the changeset viewer.