Fixed an issue in the shell causing a restart to start the wrong interpreter if a project has an embedded environments. eric7

Tue, 26 Mar 2024 10:37:58 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Tue, 26 Mar 2024 10:37:58 +0100
branch
eric7
changeset 10649
a608175336f4
parent 10648
57b0f5657250
child 10650
4618223e6e32

Fixed an issue in the shell causing a restart to start the wrong interpreter if a project has an embedded environments.

src/eric7/QScintilla/Shell.py file | annotate | diff | comparison | revisions
--- a/src/eric7/QScintilla/Shell.py	Mon Mar 25 17:47:57 2024 +0100
+++ b/src/eric7/QScintilla/Shell.py	Tue Mar 26 10:37:58 2024 +0100
@@ -2151,9 +2151,19 @@
         """
         Public slot to handle the 'restart' context menu entry.
         """
+        venvName = (
+            self.dbs.getProjectEnvironmentString()
+            if (
+                self.__project.isOpen()
+                and self.__currentVenv == self.__project.getProjectVenv(
+                    resolveDebugger=False
+                )
+            )
+            else self.__currentVenv
+        )
         self.dbs.startClient(
             False,
-            venvName=self.__currentVenv,
+            venvName=venvName,
             workingDir=self.__currentWorkingDirectory,
         )
 

eric ide

mercurial