Subversion Repositories OpenInventory

Compare Revisions

Ignore whitespace Rev 135 → Rev 136

/trunk/DBViewer/delegate.cpp
172,6 → 172,7
// QSpinBox *spinBox = static_cast<QSpinBox*>(editor);
// spinBox->setValue(value);
QString value = index.model()->data(index, Qt::EditRole).toString();
 
QComboBox *comboBox = static_cast<QComboBox*>(editor);
 
QStringList ID_list;
182,6 → 183,7
Name_list = items.values();
 
curr_index = ID_list.indexOf(value);
if (curr_index==-1) return;
comboBox->setCurrentIndex(curr_index);
/****************************************************
if (value == "0") comboBox->setCurrentIndex(0);
218,6 → 220,7
QComboBox *comboBox = static_cast<QComboBox*>(editor);
int currIndex;
currIndex = comboBox->currentIndex();
if (currIndex==-1) return;
// QString value = comboBox->itemText(currIndex);
 
ID_list = items.keys();