From c7cb7672f0c0457477bbcd0fbd64af9874e42a98 Mon Sep 17 00:00:00 2001 From: Alexis Murzeau Date: Fri, 11 Oct 2019 23:46:08 +0200 Subject: AbiWidget: Fix custom abi comboboxes' enabled state when mainComboBox is changed When the mainComboBox is updated and its current selection changed via setAbis, the custom ABI comboboxes weren't updated accordingly. This is because in setAbis when doing d->m_abi->setCurrentIndex(), the m_ignoreChanges guard is held which inhibit mainComboBoxChanged function from doing anything for performance reasons. But the effect of this is that custom ABI comboboxes were left in their previous state (enabled or disabled). This commit ensures the custom ABI comboboxes are updated according to the new selected item in the mainComboBox at the end of setAbis function. Change-Id: Iedabde412a42985697d2cba33ddb6c154f10a68f Reviewed-by: Oliver Wolff Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/abiwidget.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/abiwidget.cpp b/src/plugins/projectexplorer/abiwidget.cpp index 5df9a3ee05..319926dd54 100644 --- a/src/plugins/projectexplorer/abiwidget.cpp +++ b/src/plugins/projectexplorer/abiwidget.cpp @@ -188,7 +188,10 @@ void AbiWidget::setAbis(const Abis &abiList, const Abi ¤tAbi) setCustomAbiComboBoxes(defaultAbi); } - emitAbiChanged(defaultAbi); + + // Update disabled state according to new automatically selected item in main ABI combobox. + // This will call emitAbiChanged with the actual selected ABI. + mainComboBoxChanged(); } Abis AbiWidget::supportedAbis() const -- cgit v1.2.3