mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Cleanup: implement proper Qt-model semantics in WeightInfoModel
- Use a beginResetModel()/endResetModel() pair instead of distinct addRows / removeRows pairs. - Reuse the update function in the constructor(). - Let "rows" be the number of rows, not the number of rows minus one. - Remove updateInfo() function as it does the same as update(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
36d8dcc3bf
commit
cab0147093
3 changed files with 8 additions and 39 deletions
|
@ -425,7 +425,7 @@ void MainWindow::refreshDisplay(bool doRecreateDiveList)
|
|||
setApplicationState("Default");
|
||||
diveList->setEnabled(true);
|
||||
diveList->setFocus();
|
||||
WSInfoModel::instance()->updateInfo();
|
||||
WSInfoModel::instance()->update();
|
||||
ui.actionAutoGroup->setChecked(autogroup);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue