Skip to content
Permalink
Browse files
fix references to joined fields of vector layer
  • Loading branch information
minorua committed Nov 30, 2012
1 parent aab08cb commit 8a90e2cef61ea1b2429655574a2fcac2ceac4d3f
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/core/qgsvectorlayer.cpp
@@ -5566,14 +5566,14 @@ QVariant QgsVectorLayer::minimumValue( int index )
}
else // a joined field?
{
int indexOffset; //offset between layer index and joined provider index
int indexOffset = 0; //offset between layer index and joined provider index
const QgsVectorJoinInfo* join = mJoinBuffer->joinForFieldIndex( index, maxProviderIndex, indexOffset );
if ( join )
{
QgsVectorLayer* vl = dynamic_cast<QgsVectorLayer*>( QgsMapLayerRegistry::instance()->mapLayer( join->joinLayerId ) );
if ( vl )
{
return vl->minimumValue( index );
return vl->minimumValue( index - indexOffset );
}
}
}
@@ -5620,14 +5620,14 @@ QVariant QgsVectorLayer::maximumValue( int index )
}
else // a joined field?
{
int indexOffset; //offset between layer index and joined provider index
int indexOffset = 0; //offset between layer index and joined provider index
const QgsVectorJoinInfo* join = mJoinBuffer->joinForFieldIndex( index, maxProviderIndex, indexOffset );
if ( join )
{
QgsVectorLayer* vl = dynamic_cast<QgsVectorLayer*>( QgsMapLayerRegistry::instance()->mapLayer( join->joinLayerId ) );
if ( vl )
{
return vl->maximumValue( index );
return vl->maximumValue( index - indexOffset );
}
}
}

0 comments on commit 8a90e2c

Please sign in to comment.