Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Managed the render flag in batch tools to avoid waste of time loading…
… many layers, to fix #3254

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14875 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Dec 9, 2010
1 parent 2326f95 commit 643608c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/plugins/GdalTools/__init__.py
Expand Up @@ -22,7 +22,7 @@ def name():
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):
Expand Down
5 changes: 5 additions & 0 deletions python/plugins/GdalTools/tools/widgetBatchBase.py
Expand Up @@ -101,6 +101,10 @@ def batchFinished( self ):
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 )
Expand All @@ -109,6 +113,7 @@ def batchFinished( self ):
self.addLayerIntoCanvas( fileInfo )
else:
notCreatedList << item
canvas.setRenderFlag( previousRenderFlag )

if notCreatedList.isEmpty():
QMessageBox.information( self, self.tr( "Finished" ), self.tr( "Operation completed." ) )
Expand Down
1 change: 1 addition & 0 deletions python/plugins/GdalTools/tools/widgetPluginBase.py
Expand Up @@ -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)
Expand Down

0 comments on commit 643608c

Please sign in to comment.