Skip to content
Permalink
Browse files

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 43caf02d18341091d5ceea7e2debe07110461f44
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/qgsvectorlayer.cpp
@@ -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;
@@ -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();

0 comments on commit 43caf02

Please sign in to comment.
You can’t perform that action at this time.