ProjectExplorer: Take only changed toolchains into account

... when updating after the user pressed "Apply" in the compiler options
page.

Fixes: QTCREATORBUG-26460
Change-Id: Ibb7774547b36bf64a85a733b54d7927ff09df861
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Kandeler
2021-11-08 17:38:59 +01:00
parent e3acfcbe60
commit 02dbed75b4

View File

@@ -463,7 +463,7 @@ void ToolChainOptionsWidget::apply()
for (TreeItem *item : *parent) {
auto tcItem = static_cast<ToolChainTreeItem *>(item);
Q_ASSERT(tcItem->toolChain);
if (!tcItem->toolChain->isAutoDetected() && tcItem->widget)
if (!tcItem->toolChain->isAutoDetected() && tcItem->widget && tcItem->changed)
tcItem->widget->apply();
tcItem->changed = false;
tcItem->update();