Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[console] Allow breaking execution of scripts via Ctrl-C
This allows (in some circumstances) scripts running in the console to be halted via the Ctrl (or Meta) + C shortcut. (It's only possible to catch and abort when the script is printing outputs to the console - because this triggers QCoreApplication.processEvents() calls. Without these calls the whole QGIS application is unresponsive during script execution and there's no ability to even catch a shortcut in order to halt the execution. Still, even with this limitation it's handy to be able to break out of lengthy: for f in iface.activeLayer().getFeatures(): print(f.attributes()) loops!)
- Loading branch information
1 parent
d2244b4
commit f6269c4
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters