Skip to content

Commit 02d8042

Browse files
3nidsm-kuhn
authored andcommittedJun 10, 2016
better order of columns in fields tab (vector layer properties) (#3195)
1 parent 91de99a commit 02d8042

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
 

‎src/app/qgsfieldsproperties.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,14 @@ void QgsFieldsProperties::setRow( int row, int idx, const QgsField& field )
305305
mFieldsList->setItem( row, attrCommentCol, new QTableWidgetItem( field.comment() ) );
306306
}
307307

308-
for ( int i = 0; i < attrCommentCol; i++ )
308+
QList<int> notEditableCols = QList<int>()
309+
<< attrIdCol
310+
<< attrNameCol
311+
<< attrTypeCol
312+
<< attrTypeNameCol
313+
<< attrLengthCol
314+
<< attrPrecCol;
315+
Q_FOREACH ( int i, notEditableCols )
309316
mFieldsList->item( row, i )->setFlags( mFieldsList->item( row, i )->flags() & ~Qt::ItemIsEditable );
310317

311318
bool canRenameFields = mLayer->isEditable() && ( mLayer->dataProvider()->capabilities() & QgsVectorDataProvider::RenameAttributes ) && !mLayer->readOnly();

‎src/app/qgsfieldsproperties.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ class APP_EXPORT QgsFieldsProperties : public QWidget, private Ui_QgsFieldsPrope
192192
{
193193
attrIdCol = 0,
194194
attrNameCol,
195+
attrEditTypeCol,
196+
attrAliasCol,
195197
attrTypeCol,
196198
attrTypeNameCol,
197199
attrLengthCol,
198200
attrPrecCol,
199201
attrCommentCol,
200-
attrEditTypeCol,
201-
attrAliasCol,
202202
attrWMSCol,
203203
attrWFSCol,
204204
attrColCount,

0 commit comments

Comments
 (0)
Please sign in to comment.