Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make sure updateFields() is called before setDisplayField for new vec…
…tor layers (fix #8311)
  • Loading branch information
nyalldawson committed Aug 13, 2013
1 parent 6b21b86 commit 43caf02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/core/qgsvectorlayer.cpp
Expand Up @@ -147,10 +147,6 @@ QgsVectorLayer::QgsVectorLayer( QString vectorLayerPath,
// Always set crs
setCoordinateSystem();

mJoinBuffer = new QgsVectorLayerJoinBuffer();

updateFields();

// check if there is a default style / propertysheet defined
// for this layer and if so apply it
bool defaultLoadedFlag = false;
Expand Down Expand Up @@ -1632,6 +1628,10 @@ bool QgsVectorLayer::setDataProvider( QString const & provider )
// get and store the feature type
mWkbType = mDataProvider->geometryType();

mJoinBuffer = new QgsVectorLayerJoinBuffer();

updateFields();

// look at the fields in the layer and set the primary
// display field using some real fuzzy logic
setDisplayField();
Expand Down

0 comments on commit 43caf02

Please sign in to comment.