forked from qt-creator/qt-creator
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 <hjk@qt.io>
This commit is contained in:
@@ -160,7 +160,7 @@ private:
|
|||||||
|
|
||||||
Interpreter InterpreterAspect::currentInterpreter() const
|
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<Interpreter> &interpreters)
|
void InterpreterAspect::updateInterpreters(const QList<Interpreter> &interpreters)
|
||||||
|
Reference in New Issue
Block a user