Skip to content
Permalink
Browse files

gdaltools: move clipper dialog on top when the user ends to define a …

…new extent (fix #7783)
  • Loading branch information
brushtyler committed May 19, 2013
1 parent 5ce6688 commit 693a1fe8606cbca2d01fdf5660702f488c11343d
Showing with 9 additions and 3 deletions.
  1. +6 −1 python/plugins/GdalTools/tools/doClipper.py
  2. +3 −2 python/plugins/GdalTools/tools/extentSelector.py
@@ -61,7 +61,7 @@ def __init__(self, iface):
self.connect(self.inSelector, SIGNAL("selectClicked()"), self.fillInputFileEdit)
self.connect(self.outSelector, SIGNAL("selectClicked()"), self.fillOutputFileEdit)
self.connect(self.maskSelector, SIGNAL("selectClicked()"), self.fillMaskFileEdit)
self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.checkRun)
self.connect(self.extentSelector, SIGNAL("newExtentDefined()"), self.extentChanged)
self.connect(self.extentSelector, SIGNAL("selectionStarted()"), self.checkRun)

self.connect(self.extentModeRadio, SIGNAL("toggled(bool)"), self.switchClippingMode)
@@ -91,6 +91,11 @@ def checkRun(self):
enabler = not self.maskSelector.filename().isEmpty()
self.base.enableRun( enabler )

def extentChanged(self):
self.activateWindow()
self.raise_()
self.checkRun()

def onLayersChanged(self):
self.inSelector.setLayers( Utils.LayerRegistry.instance().getRasterLayers() )
self.maskSelector.setLayers( filter( lambda x: x.geometryType() == QGis.Polygon, Utils.LayerRegistry.instance().getVectorLayers() ) )
@@ -150,8 +150,9 @@ def canvasPressEvent(self, e):

def canvasReleaseEvent(self, e):
self.isEmittingPoint = False
if self.rectangle() != None:
self.emit( SIGNAL("rectangleCreated()") )
#if self.rectangle() != None:
# self.emit( SIGNAL("rectangleCreated()") )
self.emit( SIGNAL("rectangleCreated()") )

def canvasMoveEvent(self, e):
if not self.isEmittingPoint:

0 comments on commit 693a1fe

Please sign in to comment.
You can’t perform that action at this time.