[QGIS Commit] r13776 - branches/threading-branch/src/core
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Tue Jun 22 07:30:17 EDT 2010
Author: wonder
Date: 2010-06-22 11:30:17 +0000 (Tue, 22 Jun 2010)
New Revision: 13776
Modified:
branches/threading-branch/src/core/qgsmaprenderer.cpp
branches/threading-branch/src/core/qgsvectorlayer.cpp
branches/threading-branch/src/core/qgsvectorlayer.h
Log:
removed update treshold from vector layer (replaced by timed updates), immediate stop of threaded rendering
Modified: branches/threading-branch/src/core/qgsmaprenderer.cpp
===================================================================
--- branches/threading-branch/src/core/qgsmaprenderer.cpp 2010-06-22 08:29:49 UTC (rev 13775)
+++ branches/threading-branch/src/core/qgsmaprenderer.cpp 2010-06-22 11:30:17 UTC (rev 13776)
@@ -537,6 +537,12 @@
void _renderLayerThreading( ThreadedRenderContext& tctx )
{
QString layerId = tctx.ml->getLayerID();
+ if (tctx.ctx.renderingStopped())
+ {
+ QgsDebugMsg("rendering has been stopped => ignoring "+layerId);
+ return;
+ }
+
if (tctx.cached)
{
QgsDebugMsg("threaded cached (doing nothing): "+layerId);
Modified: branches/threading-branch/src/core/qgsvectorlayer.cpp
===================================================================
--- branches/threading-branch/src/core/qgsvectorlayer.cpp 2010-06-22 08:29:49 UTC (rev 13775)
+++ branches/threading-branch/src/core/qgsvectorlayer.cpp 2010-06-22 11:30:17 UTC (rev 13776)
@@ -95,7 +95,6 @@
QString providerKey,
bool loadDefaultStyleFlag )
: QgsMapLayer( VectorLayer, baseName, vectorLayerPath ),
- mUpdateThreshold( 0 ), // XXX better default value?
mDataProvider( NULL ),
mProviderKey( providerKey ),
mEditable( false ),
@@ -152,14 +151,6 @@
}
}
- // Get the update threshold from user settings. We
- // do this only on construction to avoid the penality of
- // fetching this each time the layer is drawn. If the user
- // changes the threshold from the preferences dialog, it will
- // have no effect on existing layers
- // TODO: load this setting somewhere else [MD]
- //QSettings settings;
- //mUpdateThreshold = settings.readNumEntry("Map/updateThreshold", 1000);
}
} // QgsVectorLayer ctor
@@ -844,10 +835,6 @@
bool QgsVectorLayer::draw( QgsRenderContext& rendererContext )
{
- //set update threshold before each draw to make sure the current setting is picked up
- QSettings settings;
- mUpdateThreshold = settings.value( "Map/updateThreshold", 0 ).toInt();
-
if ( mUsingRendererV2 )
{
if ( mRendererV2 == NULL )
@@ -921,6 +908,7 @@
mCachedGeometriesRect = rendererContext.extent();
vertexMarker = currentVertexMarkerType();
vertexMarkerSize = currentVertexMarkerSize();
+ QSettings settings;
mVertexMarkerOnlyForSelection = settings.value( "/qgis/digitizing/marker_only_for_selected", false ).toBool();
}
Modified: branches/threading-branch/src/core/qgsvectorlayer.h
===================================================================
--- branches/threading-branch/src/core/qgsvectorlayer.h 2010-06-22 08:29:49 UTC (rev 13775)
+++ branches/threading-branch/src/core/qgsvectorlayer.h 2010-06-22 11:30:17 UTC (rev 13776)
@@ -674,11 +674,6 @@
private: // Private attributes
- /** Update threshold for drawing features as they are read. A value of zero indicates
- * that no features will be drawn until all have been read
- */
- int mUpdateThreshold;
-
/** Pointer to data provider derived from the abastract base class QgsDataProvider */
QgsVectorDataProvider *mDataProvider;
More information about the QGIS-commit
mailing list