mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-06 05:45:31 +00:00
ModifyCommand uses a proper name of a modified nested value
This commit is contained in:
parent
29536751f5
commit
214f3e5b9b
1 changed files with 5 additions and 0 deletions
|
@ -21,12 +21,17 @@ CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelI
|
||||||
// Replace proxy with actual model
|
// Replace proxy with actual model
|
||||||
mIndex = proxy->mapToSource (index);
|
mIndex = proxy->mapToSource (index);
|
||||||
mModel = proxy->sourceModel();
|
mModel = proxy->sourceModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mIndex.parent().isValid())
|
||||||
|
{
|
||||||
setText ("Modify " + dynamic_cast<CSMWorld::IdTree*>(mModel)->nestedHeaderData (
|
setText ("Modify " + dynamic_cast<CSMWorld::IdTree*>(mModel)->nestedHeaderData (
|
||||||
mIndex.parent().column(), mIndex.column(), Qt::Horizontal, Qt::DisplayRole).toString());
|
mIndex.parent().column(), mIndex.column(), Qt::Horizontal, Qt::DisplayRole).toString());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
setText ("Modify " + mModel->headerData (mIndex.column(), Qt::Horizontal, Qt::DisplayRole).toString());
|
setText ("Modify " + mModel->headerData (mIndex.column(), Qt::Horizontal, Qt::DisplayRole).toString());
|
||||||
|
}
|
||||||
|
|
||||||
// Remember record state before the modification
|
// Remember record state before the modification
|
||||||
if (CSMWorld::IdTable *table = dynamic_cast<IdTable *>(mModel))
|
if (CSMWorld::IdTable *table = dynamic_cast<IdTable *>(mModel))
|
||||||
|
|
Loading…
Reference in a new issue