forked from mirror/openmw-tes3mp
Merge pull request #166 from OpenMW/master
Add OpenMW commits up to 23 Feb 2017
This commit is contained in:
commit
0d6636018f
3 changed files with 8 additions and 2 deletions
|
@ -53,6 +53,7 @@ Programmers
|
||||||
eroen
|
eroen
|
||||||
escondida
|
escondida
|
||||||
Evgeniy Mineev (sandstranger)
|
Evgeniy Mineev (sandstranger)
|
||||||
|
Federico Guerra (FedeWar)
|
||||||
Fil Krynicki (filkry)
|
Fil Krynicki (filkry)
|
||||||
Gašper Sedej
|
Gašper Sedej
|
||||||
gugus/gus
|
gugus/gus
|
||||||
|
|
|
@ -37,13 +37,17 @@ int CSMTools::ReportModel::columnCount (const QModelIndex & parent) const
|
||||||
|
|
||||||
QVariant CSMTools::ReportModel::data (const QModelIndex & index, int role) const
|
QVariant CSMTools::ReportModel::data (const QModelIndex & index, int role) const
|
||||||
{
|
{
|
||||||
if (role!=Qt::DisplayRole)
|
if (role!=Qt::DisplayRole && role!=Qt::UserRole)
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
switch (index.column())
|
switch (index.column())
|
||||||
{
|
{
|
||||||
case Column_Type:
|
case Column_Type:
|
||||||
|
|
||||||
|
if(role == Qt::UserRole)
|
||||||
|
return QString::fromUtf8 (
|
||||||
|
mRows.at (index.row()).mId.getTypeName().c_str());
|
||||||
|
else
|
||||||
return static_cast<int> (mRows.at (index.row()).mId.getType());
|
return static_cast<int> (mRows.at (index.row()).mId.getType());
|
||||||
|
|
||||||
case Column_Id:
|
case Column_Id:
|
||||||
|
|
|
@ -157,6 +157,7 @@ CSVTools::ReportTable::ReportTable (CSMDoc::Document& document,
|
||||||
|
|
||||||
mProxyModel = new QSortFilterProxyModel (this);
|
mProxyModel = new QSortFilterProxyModel (this);
|
||||||
mProxyModel->setSourceModel (mModel);
|
mProxyModel->setSourceModel (mModel);
|
||||||
|
mProxyModel->setSortRole(Qt::UserRole);
|
||||||
|
|
||||||
setModel (mProxyModel);
|
setModel (mProxyModel);
|
||||||
setColumnHidden (2, true);
|
setColumnHidden (2, true);
|
||||||
|
|
Loading…
Reference in a new issue