From 9decfcb151a58ce6fe905244be8b721ae33899c6 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Thu, 10 Jun 2021 10:14:51 +0200 Subject: [PATCH] Python: fix opening repl for project files The python interpreter aspect relyed on having a combo box setup when looking up the current interpreter. This combo box is just initialized when the widget is shown since recently. Using the current id that is valid all the time instead to get the correct interpreter. Change-Id: I0a6bde46864c44c9408d0d7331164b49da65c7df Reviewed-by: hjk --- src/plugins/python/pythonrunconfiguration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/python/pythonrunconfiguration.cpp b/src/plugins/python/pythonrunconfiguration.cpp index 47af192c931..fe8ede93b67 100644 --- a/src/plugins/python/pythonrunconfiguration.cpp +++ b/src/plugins/python/pythonrunconfiguration.cpp @@ -160,7 +160,7 @@ private: Interpreter InterpreterAspect::currentInterpreter() const { - return m_comboBox ? m_interpreters.value(m_comboBox->currentIndex()) : Interpreter(); + return Utils::findOrDefault(m_interpreters, Utils::equal(&Interpreter::id, m_currentId)); } void InterpreterAspect::updateInterpreters(const QList &interpreters)