mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-23 19:20:56 +00:00
ModifyCommand uses a proper name of a modified nested value
This commit is contained in:
parent
d038ac2da0
commit
e14aedc7cd
@ -21,12 +21,17 @@ CSMWorld::ModifyCommand::ModifyCommand (QAbstractItemModel& model, const QModelI
|
||||
// Replace proxy with actual model
|
||||
mIndex = proxy->mapToSource (index);
|
||||
mModel = proxy->sourceModel();
|
||||
}
|
||||
|
||||
if (mIndex.parent().isValid())
|
||||
{
|
||||
setText ("Modify " + dynamic_cast<CSMWorld::IdTree*>(mModel)->nestedHeaderData (
|
||||
mIndex.parent().column(), mIndex.column(), Qt::Horizontal, Qt::DisplayRole).toString());
|
||||
}
|
||||
else
|
||||
{
|
||||
setText ("Modify " + mModel->headerData (mIndex.column(), Qt::Horizontal, Qt::DisplayRole).toString());
|
||||
}
|
||||
|
||||
// Remember record state before the modification
|
||||
if (CSMWorld::IdTable *table = dynamic_cast<IdTable *>(mModel))
|
||||
|
Loading…
x
Reference in New Issue
Block a user