Skip to content

Commit

Permalink
ensured that only the layer's name column can be highlighted
Browse files Browse the repository at this point in the history
  • Loading branch information
r-a-v-a-s committed May 25, 2016
1 parent 3ad5ea7 commit 417aa2e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions librecad/src/ui/qg_layerwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,13 @@ class QG_LayerModel: public QAbstractTableModel {
};
QG_LayerModel(QObject * parent = nullptr);
~QG_LayerModel() = default;
Qt::ItemFlags flags ( const QModelIndex & /*index*/ ) const {
return Qt::ItemIsSelectable|Qt::ItemIsEnabled;}
Qt::ItemFlags flags (const QModelIndex & index) const
{
if (index.column() == 5)
return Qt::ItemIsSelectable|Qt::ItemIsEnabled;
else
return Qt::ItemIsEnabled;
}
int columnCount(const QModelIndex &/*parent*/) const {return LAST;}
int rowCount ( const QModelIndex & parent = QModelIndex() ) const;
QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
Expand Down

0 comments on commit 417aa2e

Please sign in to comment.