Commit 5ac78258 authored by Lasse Holmstedt's avatar Lasse Holmstedt
Browse files

DebuggerUI: Language selection mutual exclusive if lang is deselected

parent 439917e7
......@@ -265,6 +265,8 @@ void DebuggerUISwitcher::updateUiForRunConfiguration(ProjectExplorer::RunConfigu
void DebuggerUISwitcher::updateActiveLanguages()
{
DebuggerLanguages prevLanguages = d->m_activeDebugLanguages;
d->m_activeDebugLanguages = AnyLanguage;
if (d->m_activateCppAction->isChecked())
......@@ -274,8 +276,15 @@ void DebuggerUISwitcher::updateActiveLanguages()
d->m_activeDebugLanguages |= QmlLanguage;
if (d->m_activeDebugLanguages == AnyLanguage) {
d->m_activateCppAction->setChecked(true);
d->m_activeDebugLanguages = CppLanguage;
// do mutual exclusive selection if qml is enabled. Otherwise, just keep
// cpp language selected.
if (prevLanguages & CppLanguage && d->m_qmlEnabled) {
d->m_activeDebugLanguages = QmlLanguage;
d->m_activateQmlAction->setChecked(true);
} else {
d->m_activateCppAction->setChecked(true);
d->m_activeDebugLanguages = CppLanguage;
}
}
emit activeLanguagesChanged(d->m_activeDebugLanguages);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment