summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/simplewidgets.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-07-29 17:40:53 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-07-30 12:21:17 -0700
commit4bdd811f06096c2420a05dd3cc78fffbd7f3a663 (patch)
treec263a6b92a517d21c160d7c43439d2804423db88 /desktop-widgets/simplewidgets.cpp
parent5e1e6110ce50b33e24667ce83ab5d2417a2a466e (diff)
downloadsubsurface-4bdd811f06096c2420a05dd3cc78fffbd7f3a663.tar.gz
Cleanup: remove DiveListView::fixMessyQtModelBehaviour()
The function DiveListView::fixMessyQtModelBehaviour() was used to expand the first columns of dive-trips in the dive-list view. This function was called everytime that the dive-list was modified. It is kind of ludicrous that external callers would have to tell the DiveListView, when it has to update its column headers. Instead, place this functionality in the overriden reset() and rowsInserted() functions, as these are the only ways that rows can be added. Change the DiveTripModel to use the proper beginResetModel()/endResetModel() pair instead of the previous full deletion and full repopulation using the beginRemoveRows()/ endRemoveRows() and beginInsertRows()/endInsertRows(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/simplewidgets.cpp')
-rw-r--r--desktop-widgets/simplewidgets.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/desktop-widgets/simplewidgets.cpp b/desktop-widgets/simplewidgets.cpp
index f6b7a3fa1..4bc36daa7 100644
--- a/desktop-widgets/simplewidgets.cpp
+++ b/desktop-widgets/simplewidgets.cpp
@@ -174,7 +174,6 @@ void RenumberDialog::buttonClicked(QAbstractButton *button)
UndoRenumberDives *undoCommand = new UndoRenumberDives(renumberedDives);
MainWindow::instance()->undoStack->push(undoCommand);
- MainWindow::instance()->dive_list()->fixMessyQtModelBehaviour();
mark_divelist_changed(true);
MainWindow::instance()->dive_list()->restoreSelection();
}