mirror of
https://github.com/isledecomp/SIEdit.git
synced 2024-11-27 01:25: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,7 +26,11 @@ QVariant ObjectModel::data(const QModelIndex &index, int role) const
|
|||
switch (index.column()) {
|
||||
case kColIndex:
|
||||
if (Object *o = dynamic_cast<Object*>(c)) {
|
||||
return QString::number(o->id());
|
||||
if (!index.parent().isValid()) {
|
||||
return tr("%1:%2").arg(QString::number(index.row()), QString::number(o->id()));
|
||||
} else {
|
||||
return QString::number(o->id());
|
||||
}
|
||||
}
|
||||
//return index.row();
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue