Skip to content
Permalink
Browse files
remove the clipping rectangle closing clipper, to fix #3664
git-svn-id: http://svn.osgeo.org/qgis/trunk@15562 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
brushtyler committed Mar 22, 2011
1 parent 855601c commit a6de6592aa1652b3c2e87b5d68688c467d391334
Showing with 15 additions and 12 deletions.
  1. +8 −10 python/plugins/GdalTools/tools/dialogBase.py
  2. +7 −2 python/plugins/GdalTools/tools/extentSelector.py
@@ -66,6 +66,14 @@ def __init__(self, parent, iface, pluginBase, pluginName, pluginCommand):
self.arguments = QStringList()

def reject(self):
if self.process.state() != QProcess.NotRunning:
ret = QMessageBox.warning(self, self.tr( "Warning" ), self.tr( "The command is still running. \nDo you want terminate it anyway?" ), QMessageBox.Yes | QMessageBox.No)
if ret == QMessageBox.No:
return

self.disconnect(self.process, SIGNAL("error(QProcess::ProcessError)"), self.processError)
self.disconnect(self.process, SIGNAL("finished(int, QProcess::ExitStatus)"), self.processFinished)

self.emit( SIGNAL("closeClicked()") )

def accept(self):
@@ -129,16 +137,6 @@ def stop(self):

# called on closing the dialog, stop the process if it's running
def onClosing(self):
if self.process.state() != QProcess.NotRunning:
ret = QMessageBox.warning(self, self.tr( "Warning" ), self.tr( "The command is still running. \nDo you want terminate it anyway?" ), QMessageBox.Yes | QMessageBox.No)
if ret == QMessageBox.No:
return

self.disconnect(self.process, SIGNAL("error(QProcess::ProcessError)"), self.processError)
self.disconnect(self.process, SIGNAL("finished(int, QProcess::ExitStatus)"), self.processFinished)
#self.process.kill()
#print "Debug: " + self.command + " terminated by user"

self.stop()
QDialog.reject(self)

@@ -32,16 +32,21 @@ def setCanvas(self, canvas):
self.connect(self.tool, SIGNAL("deactivated()"), self.pause)

def stop(self):
if not self.isStarted:
return
self.isStarted = False
self.btnEnable.setVisible(False)
self.tool.reset()
self.canvas.unsetMapTool(self.tool)
self.canvas.setMapTool(self.previousMapTool)
if self.previousMapTool != self.tool:
self.canvas.setMapTool(self.previousMapTool)
#self.coordsChanged()
self.emit( SIGNAL( "selectionStopped()" ) )

def start(self):
self.previousMapTool = self.canvas.mapTool()
prevMapTool = self.canvas.mapTool()
if prevMapTool != self.tool:
self.previousMapTool = prevMapTool
self.canvas.setMapTool(self.tool)
self.isStarted = True
self.btnEnable.setVisible(False)

0 comments on commit a6de659

Please sign in to comment.