mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Removed unused debug, and set the correct data on the delegates.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
f73660cc09
commit
3e51476d87
2 changed files with 2 additions and 3 deletions
|
@ -54,7 +54,6 @@ QWidget* TankInfoDelegate::createEditor(QWidget* parent, const QStyleOptionViewI
|
|||
QComboBox *comboDelegate = new QComboBox(parent);
|
||||
TankInfoModel *model = new TankInfoModel;
|
||||
QString data = index.model()->data(index, Qt::DisplayRole).toString();
|
||||
qDebug() << "Tentando pegar " << data;
|
||||
comboDelegate->setModel(model);
|
||||
int i;
|
||||
for(i = 0; i < model->rowCount(); i++){
|
||||
|
|
|
@ -66,7 +66,7 @@ QVariant CylindersModel::data(const QModelIndex& index, int role) const
|
|||
|
||||
cylinder_t *cyl = ¤t->cylinder[index.row()];
|
||||
|
||||
if (role == Qt::DisplayRole) {
|
||||
if (role == Qt::DisplayRole || role==Qt::EditRole) {
|
||||
switch(index.column()) {
|
||||
case TYPE:
|
||||
ret = QString(cyl->type.description);
|
||||
|
@ -261,7 +261,7 @@ QVariant WeightModel::data(const QModelIndex& index, int role) const
|
|||
|
||||
weightsystem_t *ws = ¤t_dive->weightsystem[index.row()];
|
||||
|
||||
if (role == Qt::DisplayRole) {
|
||||
if (role == Qt::DisplayRole || role == Qt::EditRole) {
|
||||
switch(index.column()) {
|
||||
case TYPE:
|
||||
ret = QString(ws->description);
|
||||
|
|
Loading…
Reference in a new issue