Skip to content
Snippets Groups Projects
Commit 7bd65087 authored by marco's avatar marco
Browse files

overload sys.exit to properly close the qt application

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2691 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent f13c7aa0
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,15 @@ from ost.gui.init_spacenav import _InitSpaceNav ...@@ -19,6 +19,15 @@ from ost.gui.init_spacenav import _InitSpaceNav
from ost.gui.init_context_menu import _InitContextMenu from ost.gui.init_context_menu import _InitContextMenu
from ost.gui.init_splash import _InitSplash from ost.gui.init_splash import _InitSplash
from ost.gui.dng import termuse from ost.gui.dng import termuse
from PyQt4.QtGui import *
def _my_exit(code):
QtGui.QApplication.instance().quit()
sys._exit(code)
sys._exit=sys.exit
sys.exit=_my_exit
def _InitRuleBasedBuilder(): def _InitRuleBasedBuilder():
compound_lib_path=os.path.join(ost.GetSharedDataPath(), 'compounds.chemlib') compound_lib_path=os.path.join(ost.GetSharedDataPath(), 'compounds.chemlib')
if os.path.exists(compound_lib_path): if os.path.exists(compound_lib_path):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment