Showing with 40 additions and 40 deletions.
  1. +1 −1 cmake/SIPMacros.cmake
  2. +0 −1 python/analysis/analysis.sip
  3. +0 −1 python/core/core.sip
  4. +3 −1 python/core/qgsvectordataprovider.sip
  5. +2 −2 python/core/symbology-ng-core.sip
  6. +34 −34 src/core/qgsvectorlayer.cpp
2 changes: 1 addition & 1 deletion cmake/SIPMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ MACRO(ADD_SIP_PYTHON_MODULE MODULE_NAME MODULE_SIP)
ADD_DEFINITIONS( /wd4996 /wd4701 /wd4702 )
ELSE(MSVC)
# disable all warnings
ADD_DEFINITIONS( -w )
ADD_DEFINITIONS( -w -fpermissive )
ENDIF(MSVC)
ENDIF(PEDANTIC)

Expand Down
1 change: 0 additions & 1 deletion python/analysis/analysis.sip
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

%Module qgis.analysis 0

%Import QtCore/QtCoremod.sip
Expand Down
1 change: 0 additions & 1 deletion python/core/core.sip
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

%Module qgis.core 0

%Import QtCore/QtCoremod.sip
Expand Down
4 changes: 3 additions & 1 deletion python/core/qgsvectordataprovider.sip
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ class QgsVectorDataProvider : QgsDataProvider
ChangeGeometries = 256,
SelectGeometryAtId = 512,
RandomSelectGeometryAtId = 1024,
SequentialSelectGeometryAtId = 2048
SequentialSelectGeometryAtId = 2048,
CreateAttributeIndex = 4096,
SetEncoding = 8192,
};

/** bitmask of all provider's editing capabilities */
Expand Down
4 changes: 2 additions & 2 deletions python/core/symbology-ng-core.sip
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,10 @@ class QgsSymbolV2RenderContext
void setAlpha( qreal alpha );

bool selected() const;
void setSelected( bool selected ) const;
void setSelected( bool selected );

//! @note added in 1.5
int renderHints() const;
int renderHints();
//! @note added in 1.5
void setRenderHints( int hints );

Expand Down
68 changes: 34 additions & 34 deletions src/core/qgsvectorlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,7 @@ void QgsVectorLayer::drawRendererV2( QgsRenderContext& rendererContext, bool lab
}

// labeling - register feature
if ( mRendererV2->symbolForFeature( fet ) != NULL )
if ( mRendererV2->symbolForFeature( fet ) != NULL && rendererContext.labelingEngine() )
{
if ( labeling )
{
Expand Down Expand Up @@ -847,7 +847,7 @@ void QgsVectorLayer::drawRendererV2Levels( QgsRenderContext& rendererContext, bo
mCachedGeometries[fet.id()] = *fet.geometry();
}

if ( sym )
if ( sym && rendererContext.labelingEngine() )
{
if ( labeling )
{
Expand Down Expand Up @@ -1094,7 +1094,7 @@ bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
//double scale = rendererContext.scaleFactor() / markerScaleFactor;
drawFeature( rendererContext, fet, &marker );

if ( mRenderer->willRenderFeature( &fet ) )
if ( mRenderer->willRenderFeature( &fet ) && rendererContext.labelingEngine() )
{
if ( labeling )
{
Expand Down Expand Up @@ -5289,47 +5289,47 @@ void QgsVectorLayer::updateAttributeMapIndex( QgsAttributeMap& map, int oldIndex

void QgsVectorLayer::prepareLabelingAndDiagrams( QgsRenderContext& rendererContext, QgsAttributeList& attributes, bool& labeling )
{
if ( rendererContext.labelingEngine() )
if ( !rendererContext.labelingEngine() )
return;

QSet<int> attrIndex;
if ( rendererContext.labelingEngine()->prepareLayer( this, attrIndex, rendererContext ) )
{
QSet<int> attrIndex;
if ( rendererContext.labelingEngine()->prepareLayer( this, attrIndex, rendererContext ) )
QSet<int>::const_iterator attIt = attrIndex.constBegin();
for ( ; attIt != attrIndex.constEnd(); ++attIt )
{
QSet<int>::const_iterator attIt = attrIndex.constBegin();
for ( ; attIt != attrIndex.constEnd(); ++attIt )
if ( !attributes.contains( *attIt ) )
{
if ( !attributes.contains( *attIt ) )
{
attributes << *attIt;
}
attributes << *attIt;
}
labeling = true;
}
labeling = true;
}

//register diagram layers
if ( mDiagramRenderer && mDiagramLayerSettings )
//register diagram layers
if ( mDiagramRenderer && mDiagramLayerSettings )
{
mDiagramLayerSettings->renderer = mDiagramRenderer;
rendererContext.labelingEngine()->addDiagramLayer( this, mDiagramLayerSettings );
//add attributes needed by the diagram renderer
QList<int> att = mDiagramRenderer->diagramAttributes();
QList<int>::const_iterator attIt = att.constBegin();
for ( ; attIt != att.constEnd(); ++attIt )
{
mDiagramLayerSettings->renderer = mDiagramRenderer;
rendererContext.labelingEngine()->addDiagramLayer( this, mDiagramLayerSettings );
//add attributes needed by the diagram renderer
QList<int> att = mDiagramRenderer->diagramAttributes();
QList<int>::const_iterator attIt = att.constBegin();
for ( ; attIt != att.constEnd(); ++attIt )
{
if ( !attributes.contains( *attIt ) )
{
attributes << *attIt;
}
}
//and the ones needed for data defined diagram positions
if ( mDiagramLayerSettings->xPosColumn >= 0 && !attributes.contains( mDiagramLayerSettings->xPosColumn ) )
{
attributes << mDiagramLayerSettings->xPosColumn;
}
if ( mDiagramLayerSettings->yPosColumn >= 0 && !attributes.contains( mDiagramLayerSettings->yPosColumn ) )
if ( !attributes.contains( *attIt ) )
{
attributes << mDiagramLayerSettings->yPosColumn;
attributes << *attIt;
}
}
//and the ones needed for data defined diagram positions
if ( mDiagramLayerSettings->xPosColumn >= 0 && !attributes.contains( mDiagramLayerSettings->xPosColumn ) )
{
attributes << mDiagramLayerSettings->xPosColumn;
}
if ( mDiagramLayerSettings->yPosColumn >= 0 && !attributes.contains( mDiagramLayerSettings->yPosColumn ) )
{
attributes << mDiagramLayerSettings->yPosColumn;
}
}
}

Expand Down