mirror of
https://github.com/isledecomp/SIEdit.git
synced 2024-11-27 09:35:45 -05:00
app: for root items, show index as well
This commit is contained in:
parent
cb53beb445
commit
01d5395c7c
1 changed files with 5 additions and 1 deletions
|
@ -26,8 +26,12 @@ QVariant ObjectModel::data(const QModelIndex &index, int role) const
|
||||||
switch (index.column()) {
|
switch (index.column()) {
|
||||||
case kColIndex:
|
case kColIndex:
|
||||||
if (Object *o = dynamic_cast<Object*>(c)) {
|
if (Object *o = dynamic_cast<Object*>(c)) {
|
||||||
|
if (!index.parent().isValid()) {
|
||||||
|
return tr("%1:%2").arg(QString::number(index.row()), QString::number(o->id()));
|
||||||
|
} else {
|
||||||
return QString::number(o->id());
|
return QString::number(o->id());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//return index.row();
|
//return index.row();
|
||||||
break;
|
break;
|
||||||
case kColName:
|
case kColName:
|
||||||
|
|
Loading…
Reference in a new issue