mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: use C++ structures for tanksystem info
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
1af00703b3
commit
3c1401785b
13 changed files with 93 additions and 123 deletions
|
@ -219,9 +219,7 @@ void TankInfoDelegate::setModelData(QWidget *, QAbstractItemModel *model, const
|
|||
return;
|
||||
}
|
||||
|
||||
volume_t tankSize = {0};
|
||||
pressure_t tankPressure = {0};
|
||||
get_tank_info_data(&tank_info_table, qPrintable(cylinderName), &tankSize, &tankPressure);
|
||||
auto [tankSize, tankPressure] = get_tank_info_data(tank_info_table, cylinderName.toStdString());
|
||||
mymodel->setData(IDX(CylindersModel::TYPE), cylinderName, CylindersModel::TEMP_ROLE);
|
||||
mymodel->setData(IDX(CylindersModel::WORKINGPRESS), tankPressure.mbar, CylindersModel::TEMP_ROLE);
|
||||
mymodel->setData(IDX(CylindersModel::SIZE), tankSize.mliter, CylindersModel::TEMP_ROLE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue