mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c4d6055e4a
commit
7aac3852c1
1 changed files with 6 additions and 0 deletions
|
@ -59,6 +59,12 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent),
|
|||
memset(&displayed_dive, 0, sizeof(displayed_dive));
|
||||
memset(&displayedTrip, 0, sizeof(displayedTrip));
|
||||
|
||||
// This makes sure we only delete the models
|
||||
// after the destructor of the tables,
|
||||
// this is needed to save the column sizes.
|
||||
cylindersModel->setParent(ui.cylinders);
|
||||
weightModel->setParent(ui.weights);
|
||||
|
||||
ui.cylinders->setModel(cylindersModel);
|
||||
ui.weights->setModel(weightModel);
|
||||
closeMessage();
|
||||
|
|
Loading…
Add table
Reference in a new issue