diff --git a/AUTHORS.md b/AUTHORS.md index 432b3ee1c..d7e011cd8 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -53,6 +53,7 @@ Programmers eroen escondida Evgeniy Mineev (sandstranger) + Federico Guerra (FedeWar) Fil Krynicki (filkry) Gašper Sedej gugus/gus diff --git a/apps/opencs/model/tools/reportmodel.cpp b/apps/opencs/model/tools/reportmodel.cpp index 49de1d651..f9a1fdb0c 100644 --- a/apps/opencs/model/tools/reportmodel.cpp +++ b/apps/opencs/model/tools/reportmodel.cpp @@ -37,14 +37,18 @@ int CSMTools::ReportModel::columnCount (const QModelIndex & parent) const QVariant CSMTools::ReportModel::data (const QModelIndex & index, int role) const { - if (role!=Qt::DisplayRole) + if (role!=Qt::DisplayRole && role!=Qt::UserRole) return QVariant(); switch (index.column()) { case Column_Type: - return static_cast (mRows.at (index.row()).mId.getType()); + if(role == Qt::UserRole) + return QString::fromUtf8 ( + mRows.at (index.row()).mId.getTypeName().c_str()); + else + return static_cast (mRows.at (index.row()).mId.getType()); case Column_Id: { diff --git a/apps/opencs/view/tools/reporttable.cpp b/apps/opencs/view/tools/reporttable.cpp index 58feda7c9..4d1456cd9 100644 --- a/apps/opencs/view/tools/reporttable.cpp +++ b/apps/opencs/view/tools/reporttable.cpp @@ -157,6 +157,7 @@ CSVTools::ReportTable::ReportTable (CSMDoc::Document& document, mProxyModel = new QSortFilterProxyModel (this); mProxyModel->setSourceModel (mModel); + mProxyModel->setSortRole(Qt::UserRole); setModel (mProxyModel); setColumnHidden (2, true);