spacesyntax / CatchmentAnalyser

Calculate catchments from multiple origins using multiple costs.
GNU General Public License v3.0
0 stars 1 forks source link

Cancel when not running gives "silent" errors #19

Closed jorgegil closed 7 years ago

jorgegil commented 7 years ago

When the dialog is closed using the cancel button when no analysis is running, gives this "silent" error: Traceback (most recent call last): File "/Users/jorge/.qgis2/python/plugins/esstoolkit-dev/catchment_analyser/CatchmentAnalyser.py", line 282, in killAnalysis self.analysis_thread.quit() RuntimeError: wrapped C/C++ object of type QThread has been deleted Traceback (most recent call last): File "/Users/jorge/.qgis2/python/plugins/esstoolkit-dev/catchment_analyser/CatchmentAnalyser.py", line 275, in killAnalysis self.analysis.finished.disconnect(self.analysisFinish) TypeError: 'instancemethod' object is not connected

jorgegil commented 7 years ago

The cancel button has a double use, maybe not ideal. Could consider having a cancel button, only active when running, and a close button to close the dialog any time. Closing while running should trigger cancel...