Sun, 27 Jan 2019 12:37:53 +0100
VirtualenvManager: fixed a bug causing a newly created environment being added as a global one.
VirtualEnv/VirtualenvManager.py | file | annotate | diff | comparison | revisions |
--- a/VirtualEnv/VirtualenvManager.py Sat Jan 26 17:04:11 2019 +0100 +++ b/VirtualEnv/VirtualenvManager.py Sun Jan 27 12:37:53 2019 +0100 @@ -21,6 +21,7 @@ from E5Gui import E5MessageBox import Preferences +import Utilities class VirtualenvManager(QObject): @@ -197,7 +198,9 @@ dlg = VirtualenvInterpreterSelectionDialog(venvName, venvDirectory) if dlg.exec_() == QDialog.Accepted: venvInterpreter, venvVariant = dlg.getData() - isGlobal = True + if not Utilities.startswithPath(venvInterpreter, + venvDirectory): + isGlobal = True if venvInterpreter: self.__virtualEnvironments[venvName] = {