mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: convert weightsystem_t and weightsystem_table to C++
As for cylinders, this had to be done simultaneously, Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
28520da655
commit
640ecb345b
28 changed files with 137 additions and 247 deletions
|
@ -335,10 +335,10 @@ void WSInfoDelegate::editorClosed(QWidget *, QAbstractItemDelegate::EndEditHint
|
|||
void WSInfoDelegate::setModelData(QWidget *, QAbstractItemModel *, const QModelIndex &) const
|
||||
{
|
||||
WeightModel *mymodel = qobject_cast<WeightModel *>(currCombo.model);
|
||||
QString weightName = currCombo.activeText;
|
||||
weight_t weight = get_weightsystem_weight(qPrintable(weightName));
|
||||
std::string weightName = currCombo.activeText.toStdString();
|
||||
weight_t weight = get_weightsystem_weight(weightName.c_str());
|
||||
|
||||
mymodel->setTempWS(currCombo.currRow, weightsystem_t{ weight, copy_qstring(weightName), false });
|
||||
mymodel->setTempWS(currCombo.currRow, weightsystem_t( weight, std::move(weightName), false ));
|
||||
}
|
||||
|
||||
static QAbstractItemModel *createWSInfoModel(QWidget *parent)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue