Preferences/ConfigurationPages/PythonPage.py

changeset 6381
37f23590dbbc
parent 6048
82ad8ec9548c
child 6645
ad476851d7e0
--- a/Preferences/ConfigurationPages/PythonPage.py	Sat Jun 30 13:56:44 2018 +0200
+++ b/Preferences/ConfigurationPages/PythonPage.py	Sat Jun 30 13:59:56 2018 +0200
@@ -9,6 +9,8 @@
 
 from __future__ import unicode_literals
 
+from PyQt5.QtCore import pyqtSlot
+
 from .ConfigurationPageBase import ConfigurationPageBase
 from .Ui_PythonPage import Ui_PythonPage
 
@@ -45,6 +47,11 @@
         self.py3ExtensionsEdit.setText(
             Preferences.getDebugger("Python3Extensions"))
         
+        self.py2EnvironmentEdit.setText(
+            Preferences.getDebugger("Python2VirtualEnv"))
+        self.py3EnvironmentEdit.setText(
+            Preferences.getDebugger("Python3VirtualEnv"))
+    
     def save(self):
         """
         Public slot to save the Python configuration.
@@ -66,6 +73,16 @@
             "Python3Extensions",
             self.py3ExtensionsEdit.text())
     
+    @pyqtSlot()
+    def on_refreshButton_clicked(self):
+        """
+        Private slot handling a click of the refresh button.
+        """
+        self.py2EnvironmentEdit.setText(
+            Preferences.getDebugger("Python2VirtualEnv"))
+        self.py3EnvironmentEdit.setText(
+            Preferences.getDebugger("Python3VirtualEnv"))
+    
 
 def create(dlg):
     """

eric ide

mercurial