mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-08 14:49:58 +01:00
Make a copie of previous table model when unlink a table from her previous table.
This commit is contained in:
@@ -39,6 +39,19 @@ NomenclatureModel::NomenclatureModel(QETProject *project, QObject *parent) :
|
||||
connect(m_project->dataBase(), &projectDataBase::dataBaseUpdated, this, &NomenclatureModel::dataBaseUpdated);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief NomenclatureModel::NomenclatureModel
|
||||
* @param other_model
|
||||
*/
|
||||
NomenclatureModel::NomenclatureModel(const NomenclatureModel &other_model)
|
||||
{
|
||||
this->setParent(other_model.parent());
|
||||
m_project = other_model.m_project;
|
||||
connect(m_project->dataBase(), &projectDataBase::dataBaseUpdated, this, &NomenclatureModel::dataBaseUpdated);
|
||||
m_index_0_0_data = other_model.m_index_0_0_data;
|
||||
query(other_model.queryString());
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief NomenclatureModel::rowCount
|
||||
* Reimplemented for QAbstractTableModel
|
||||
@@ -346,5 +359,6 @@ void NomenclatureModel::fillValue()
|
||||
++i;
|
||||
}
|
||||
m_record << record_;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user