diff options
-rw-r--r-- | qt-ui/divelistview.cpp | 2 | ||||
-rw-r--r-- | qt-ui/maintab.cpp | 4 | ||||
-rw-r--r-- | qt-ui/tableview.cpp | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 383307613..0996130c4 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -34,6 +34,8 @@ DiveListView::DiveListView(QWidget *parent) : QTreeView(parent), mouseClickSelec setSortingEnabled(false); setContextMenuPolicy(Qt::DefaultContextMenu); header()->setContextMenuPolicy(Qt::ActionsContextMenu); + const QFontMetrics metrics(defaultModelFont()); + header()->setMinimumHeight(metrics.height() + 10); QAction *showSearchBox = new QAction(tr("Show Search Box"), this); showSearchBox->setShortcut( Qt::CTRL + Qt::Key_F); showSearchBox->setShortcutContext(Qt::ApplicationShortcut); diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index cc56a58c6..4512005f2 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -461,8 +461,8 @@ void MainTab::acceptChanges() if (weightModel->changed) { mark_divelist_changed(TRUE); Q_FOREACH (dive *d, notesBackup.keys()) { - for (int i = 0; i < MAX_CYLINDERS; i++) { - d->cylinder[i] = multiEditEquipmentPlaceholder.cylinder[i]; + for (int i = 0; i < MAX_WEIGHTSYSTEMS; i++) { + d->weightsystem[i] = multiEditEquipmentPlaceholder.weightsystem[i]; } } } diff --git a/qt-ui/tableview.cpp b/qt-ui/tableview.cpp index 88a9c3fb9..02bf20843 100644 --- a/qt-ui/tableview.cpp +++ b/qt-ui/tableview.cpp @@ -64,9 +64,8 @@ void TableView::setModel(QAbstractItemModel *model){ } s.endGroup(); - ui->tableView->horizontalHeader()->setResizeMode(0, QHeaderView::Fixed); QFontMetrics metrics(defaultModelFont()); - ui->tableView->verticalHeader()->setDefaultSectionSize( metrics.height() + 8 ); + ui->tableView->horizontalHeader()->setMinimumHeight(metrics.height() + 10); } void TableView::fixPlusPosition() |