mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Gas choices working, both directions ( Planner and Table )
The gas choice now works and correctly ( I hope ) calculates the gas choosen to show on the planner. User can choose the gas from the list on the visual planner, and also on the table. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
2d0e877bb2
commit
5e722a93e4
4 changed files with 41 additions and 11 deletions
|
@ -262,6 +262,10 @@ void AirTypesDelegate::revertModelData(QWidget* widget, QAbstractItemDelegate::E
|
|||
|
||||
void AirTypesDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const
|
||||
{
|
||||
if (!index.isValid())
|
||||
return;
|
||||
QComboBox *combo = qobject_cast<QComboBox*>(editor);
|
||||
model->setData(index, QVariant(combo->currentText()));
|
||||
}
|
||||
|
||||
AirTypesDelegate::AirTypesDelegate(QObject* parent) : ComboBoxDelegate(airTypes(), parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue