From 01a3bd2cc6dcc035607cce61285ed9cc8d807b9b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 23 May 2013 18:40:16 -0700 Subject: Add weightsystem delegate to enable editing of weightsystem This is very much analogous to the way cylinders are implemented. That means that just like with cylinders, if the user enters a new type and hits 'tab' before hitting 'enter', Subsurface will crash. Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui/maintab.cpp') diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 2306e22dc..65b636961 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -83,7 +83,8 @@ MainTab::MainTab(QWidget *parent) : QTabWidget(parent), ui->cylinders->horizontalHeader()->setResizeMode (CylindersModel::REMOVE , QHeaderView::Fixed); ui->cylinders->setItemDelegateForColumn(CylindersModel::TYPE, new TankInfoDelegate()); ui->weights->setColumnWidth(WeightModel::REMOVE, 24); - ui->cylinders->horizontalHeader()->setResizeMode (WeightModel::REMOVE , QHeaderView::Fixed); + ui->weights->horizontalHeader()->setResizeMode (WeightModel::REMOVE , QHeaderView::Fixed); + ui->weights->setItemDelegateForColumn(WeightModel::TYPE, new WSInfoDelegate()); } // We need to manually position the 'plus' on cylinder and weight. -- cgit v1.2.3-70-g09d2