Fix moving columns around when one of the columns is empty

I used to compare strings, but since there can be more than one empty
column, this was a very sad choice, now I'm comparing indexes.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-01-07 15:40:10 -02:00 committed by Dirk Hohndel
parent 3b654438b6
commit 11fc888cdc
2 changed files with 10 additions and 7 deletions

View file

@ -40,7 +40,7 @@ public:
int columnCount(const QModelIndex &parent = QModelIndex()) const;
void setColumnValues(QList<QStringList> columns);
QStringList result() const;
void swapValues(const QString& one, const QString& other);
void swapValues(int firstIndex, int secondIndex);
private:
QList<QStringList> columnValues;
QStringList columnNames;