Add row number column in model instead of vertical header

THis is because the column can be sorted but the header not.
This commit is contained in:
eelke 2022-04-02 13:55:24 +02:00
parent 1ab119c29a
commit f492c8f9bc
3 changed files with 37 additions and 12 deletions

View file

@ -51,6 +51,8 @@ public slots:
private:
using PKeyValues = std::vector<std::string>;
const int PreColumnCount = 1;
class ColumnSort {
public:
@ -220,7 +222,7 @@ private:
Value getLatestData(int column, int row) const;
Value getLatestData(const QModelIndex &index) const
{
return getLatestData(index.column(), index.row());
return getLatestData(index.column() - PreColumnCount, index.row());
}
Value getSavedData(int columnIndex, int rowIndex) const;
Value getSavedData(const RowMapping &row_mapping, int columnIndex) const;