From 6d165b11c02ca12bcb806ad7094818ffa3bbd712 Mon Sep 17 00:00:00 2001
From: janezd <janez.demsar@fri.uni-lj.si>
Date: Wed, 19 Jun 2013 12:00:13 +0200
Subject: [PATCH 5/7] Close on CTRL+C when running as "single instance".

Needed for PyCharm's single instance mode.
---
 Orange/canvas/__main__.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Orange/canvas/__main__.py b/Orange/canvas/__main__.py
index c062082..d74aebd 100644
--- a/Orange/canvas/__main__.py
+++ b/Orange/canvas/__main__.py
@@ -43,6 +43,10 @@ def running_in_ipython():
         return False
 
 
+if "PYCHARM_HOSTED" in os.environ:
+    import signal
+    signal.signal(signal.SIGINT, signal.SIG_DFL)
+
 def fix_win_pythonw_std_stream():
     """
     On windows when running without a console (using pythonw.exe) the
-- 
1.8.4.3

