Skip to content

Commit

Permalink
better order of columns in fields tab (vector layer properties) (#3195)
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and m-kuhn committed Jun 10, 2016
1 parent 91de99a commit 02d8042
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/app/qgsfieldsproperties.cpp
Expand Up @@ -305,7 +305,14 @@ void QgsFieldsProperties::setRow( int row, int idx, const QgsField& field )
mFieldsList->setItem( row, attrCommentCol, new QTableWidgetItem( field.comment() ) );
}

for ( int i = 0; i < attrCommentCol; i++ )
QList<int> notEditableCols = QList<int>()
<< attrIdCol
<< attrNameCol
<< attrTypeCol
<< attrTypeNameCol
<< attrLengthCol
<< attrPrecCol;
Q_FOREACH ( int i, notEditableCols )
mFieldsList->item( row, i )->setFlags( mFieldsList->item( row, i )->flags() & ~Qt::ItemIsEditable );

bool canRenameFields = mLayer->isEditable() && ( mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::RenameAttributes ) && !mLayer->readOnly();
Expand Down
4 changes: 2 additions & 2 deletions src/app/qgsfieldsproperties.h
Expand Up @@ -192,13 +192,13 @@ class APP_EXPORT QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPrope
{
attrIdCol = 0,
attrNameCol,
attrEditTypeCol,
attrAliasCol,
attrTypeCol,
attrTypeNameCol,
attrLengthCol,
attrPrecCol,
attrCommentCol,
attrEditTypeCol,
attrAliasCol,
attrWMSCol,
attrWFSCol,
attrColCount,
Expand Down

0 comments on commit 02d8042

Please sign in to comment.