mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 16:11:37 -04:00
make modification column optional in table views
This commit is contained in:
parent
4f6c7b0e84
commit
42db9a5091
@ -425,21 +425,27 @@ void CSVWorld::Table::tableSizeUpdate()
|
|||||||
{
|
{
|
||||||
int rows = mProxyModel->rowCount();
|
int rows = mProxyModel->rowCount();
|
||||||
|
|
||||||
for (int i=0; i<rows; ++i)
|
int columnIndex = mModel->searchColumnIndex (CSMWorld::Columns::ColumnId_Modification);
|
||||||
|
|
||||||
|
if (columnIndex!=-1)
|
||||||
{
|
{
|
||||||
QModelIndex index = mProxyModel->mapToSource (mProxyModel->index (i, 0));
|
for (int i=0; i<rows; ++i)
|
||||||
|
|
||||||
int columnIndex = mModel->findColumnIndex (CSMWorld::Columns::ColumnId_Modification);
|
|
||||||
int state = mModel->data (mModel->index (index.row(), columnIndex)).toInt();
|
|
||||||
|
|
||||||
switch (state)
|
|
||||||
{
|
{
|
||||||
case CSMWorld::RecordBase::State_BaseOnly: ++size; break;
|
QModelIndex index = mProxyModel->mapToSource (mProxyModel->index (i, 0));
|
||||||
case CSMWorld::RecordBase::State_Modified: ++size; ++modified; break;
|
|
||||||
case CSMWorld::RecordBase::State_ModifiedOnly: ++size; ++modified; break;
|
int state = mModel->data (mModel->index (index.row(), columnIndex)).toInt();
|
||||||
case CSMWorld::RecordBase:: State_Deleted: ++deleted; ++modified; break;
|
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case CSMWorld::RecordBase::State_BaseOnly: ++size; break;
|
||||||
|
case CSMWorld::RecordBase::State_Modified: ++size; ++modified; break;
|
||||||
|
case CSMWorld::RecordBase::State_ModifiedOnly: ++size; ++modified; break;
|
||||||
|
case CSMWorld::RecordBase:: State_Deleted: ++deleted; ++modified; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
size = rows;
|
||||||
}
|
}
|
||||||
|
|
||||||
tableSizeChanged (size, deleted, modified);
|
tableSizeChanged (size, deleted, modified);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user