refactoring in matplotlib support

This commit is contained in:
Elizaveta Shashkova
2015-02-10 15:55:10 +03:00
parent eb6a2e269b
commit c3b333e727
3 changed files with 36 additions and 35 deletions

View File

@@ -176,7 +176,9 @@ def process_exec_queue(interpreter):
from pydev_import_hook import import_hook_manager
from pydev_ipython.matplotlibtools import activate_matplotlib, activate_pylab, activate_pyplot
import_hook_manager.add_module_name("matplotlib", activate_matplotlib(interpreter))
import_hook_manager.add_module_name("matplotlib", lambda: activate_matplotlib(interpreter.enableGui))
# enable_gui_function in activate_matplotlib should be called in main thread. That's why we call
# interpreter.enableGui which put it into the interpreter's exec_queue and executes it in the main thread.
import_hook_manager.add_module_name("pylab", activate_pylab)
import_hook_manager.add_module_name("pyplot", activate_pyplot)