forked from teamnwah/openmw-tes3coop
Sort tables by ID in the ascending order initially
This commit is contained in:
parent
52d8bc555c
commit
d038ac2da0
1 changed files with 6 additions and 2 deletions
|
@ -273,12 +273,16 @@ CSVWorld::Table::Table (const CSMWorld::UniversalId& id,
|
||||||
horizontalHeader()->setResizeMode (QHeaderView::Interactive);
|
horizontalHeader()->setResizeMode (QHeaderView::Interactive);
|
||||||
#endif
|
#endif
|
||||||
verticalHeader()->hide();
|
verticalHeader()->hide();
|
||||||
setSortingEnabled (sorting);
|
|
||||||
setSelectionBehavior (QAbstractItemView::SelectRows);
|
setSelectionBehavior (QAbstractItemView::SelectRows);
|
||||||
setSelectionMode (QAbstractItemView::ExtendedSelection);
|
setSelectionMode (QAbstractItemView::ExtendedSelection);
|
||||||
|
|
||||||
int columns = mModel->columnCount();
|
setSortingEnabled (sorting);
|
||||||
|
if (sorting)
|
||||||
|
{
|
||||||
|
sortByColumn (mModel->findColumnIndex(CSMWorld::Columns::ColumnId_Id), Qt::AscendingOrder);
|
||||||
|
}
|
||||||
|
|
||||||
|
int columns = mModel->columnCount();
|
||||||
for (int i=0; i<columns; ++i)
|
for (int i=0; i<columns; ++i)
|
||||||
{
|
{
|
||||||
int flags = mModel->headerData (i, Qt::Horizontal, CSMWorld::ColumnBase::Role_Flags).toInt();
|
int flags = mModel->headerData (i, Qt::Horizontal, CSMWorld::ColumnBase::Role_Flags).toInt();
|
||||||
|
|
Loading…
Reference in a new issue