1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 19:19:56 +00:00

set default value for cell when cloning references

This commit is contained in:
Marc Zinnschlag 2014-09-20 12:54:25 +02:00
parent b39cdb7645
commit 8ce87803c4

View file

@ -126,6 +126,14 @@ void CSVWorld::ReferenceCreator::cellChanged()
void CSVWorld::ReferenceCreator::cloneMode(const std::string& originId,
const CSMWorld::UniversalId::Type type)
{
CSMWorld::IdTable& referenceTable = dynamic_cast<CSMWorld::IdTable&> (
*getData().getTableModel (CSMWorld::UniversalId::Type_References));
int cellIdColumn = referenceTable.findColumnIndex (CSMWorld::Columns::ColumnId_Cell);
mCell->setText (
referenceTable.data (referenceTable.getModelIndex (originId, cellIdColumn)).toString());
CSVWorld::GenericCreator::cloneMode(originId, type);
cellChanged(); //otherwise ok button will remain disabled
}