Support for an empty column

This commit is contained in:
Klaus Basan
2019-04-26 01:16:39 +02:00
parent c51dce8bfd
commit 99c6a03b6f
9 changed files with 64 additions and 2 deletions

View File

@@ -102,9 +102,14 @@ namespace BlackGui
const int row = index.row();
const int col = index.column();
const CPropertyIndex propertyIndex = this->columnToPropertyIndex(col);
if (static_cast<int>(CPropertyIndex::GlobalIndexLineNumber) == propertyIndex.frontCasted<int>())
const int propertyIndexFront = propertyIndex.frontCasted<int>();
// special cases
switch (propertyIndexFront)
{
return QVariant::fromValue(row + 1);
case CPropertyIndex::GlobalIndexLineNumber: return QVariant::fromValue(row + 1);
case CPropertyIndex::GlobalIndexEmpty: return {};
default: break; // continue here
}
// Formatted data