mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
remove the clipping rectangle closing clipper, to fix #3664
git-svn-id: http://svn.osgeo.org/qgis/trunk@15562 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
855601c3d6
commit
a6de6592aa
@ -66,6 +66,14 @@ class GdalToolsBaseDialog(QDialog, Ui_Dialog):
|
||||
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 @@ class GdalToolsBaseDialog(QDialog, Ui_Dialog):
|
||||
|
||||
# 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 @@ class GdalToolsExtentSelector(QWidget, Ui_ExtentSelector):
|
||||
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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user