[QGIS Commit] r14875 - in trunk/qgis/python/plugins/GdalTools: .
tools
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Wed Dec 8 19:53:56 EST 2010
Author: brushtyler
Date: 2010-12-08 16:53:56 -0800 (Wed, 08 Dec 2010)
New Revision: 14875
Modified:
trunk/qgis/python/plugins/GdalTools/__init__.py
trunk/qgis/python/plugins/GdalTools/tools/widgetBatchBase.py
trunk/qgis/python/plugins/GdalTools/tools/widgetPluginBase.py
Log:
Managed the render flag in batch tools to avoid waste of time loading many layers, to fix #3254
Modified: trunk/qgis/python/plugins/GdalTools/__init__.py
===================================================================
--- trunk/qgis/python/plugins/GdalTools/__init__.py 2010-12-08 21:01:12 UTC (rev 14874)
+++ trunk/qgis/python/plugins/GdalTools/__init__.py 2010-12-09 00:53:56 UTC (rev 14875)
@@ -22,7 +22,7 @@
def description():
return "Integrate gdal tools into qgis"
def version():
- return "Version 1.2.17"
+ return "Version 1.2.18"
def qgisMinimumVersion():
return "1.0"
def classFactory(iface):
Modified: trunk/qgis/python/plugins/GdalTools/tools/widgetBatchBase.py
===================================================================
--- trunk/qgis/python/plugins/GdalTools/tools/widgetBatchBase.py 2010-12-08 21:01:12 UTC (rev 14874)
+++ trunk/qgis/python/plugins/GdalTools/tools/widgetBatchBase.py 2010-12-09 00:53:56 UTC (rev 14875)
@@ -101,6 +101,10 @@
msg = QString( "Processing of the following files ended with error: <br><br>" ).append( self.errors.join( "<br><br>" ) )
QErrorMessage( self ).showMessage( msg )
+ # load layers managing the render flag to avoid waste of time
+ canvas = self.iface.mapCanvas()
+ previousRenderFlag = canvas.renderFlag()
+ canvas.setRenderFlag( False )
notCreatedList = QStringList()
for item in self.outFiles:
fileInfo = QFileInfo( item )
@@ -109,6 +113,7 @@
self.addLayerIntoCanvas( fileInfo )
else:
notCreatedList << item
+ canvas.setRenderFlag( previousRenderFlag )
if notCreatedList.isEmpty():
QMessageBox.information( self, self.tr( "Finished" ), self.tr( "Operation completed." ) )
Modified: trunk/qgis/python/plugins/GdalTools/tools/widgetPluginBase.py
===================================================================
--- trunk/qgis/python/plugins/GdalTools/tools/widgetPluginBase.py 2010-12-08 21:01:12 UTC (rev 14874)
+++ trunk/qgis/python/plugins/GdalTools/tools/widgetPluginBase.py 2010-12-09 00:53:56 UTC (rev 14875)
@@ -10,6 +10,7 @@
class GdalToolsBasePluginWidget:
def __init__(self, iface, commandName, helpFileBaseName = None, parent = None):
+ self.iface = iface
self.base = BaseDialog(parent, iface, self, self.windowTitle(), commandName)
self.connect(self.base, SIGNAL("processError(QProcess::ProcessError)"), self.onError)
self.connect(self.base, SIGNAL("processFinished(int, QProcess::ExitStatus)"), self.onFinished)
More information about the QGIS-commit
mailing list