Commit fd43bdd5 authored by Daniel Teske's avatar Daniel Teske Committed by Tobias Hunger

Toolchain Options Page: Hide widget

Sometimes on repeated and fast clicking the old widget wasn't hidden
correctly.

Change-Id: I0c00416593609a46b8c2229fdb855110deeb9354
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent db7d64f1
......@@ -573,7 +573,9 @@ void ToolChainOptionsPage::toolChainSelectionChanged()
if (!m_container)
return;
QModelIndex current = currentIndex();
(void)m_container->takeWidget(); // Prevent deletion.
QWidget *oldWidget = m_container->takeWidget(); // Prevent deletion.
if (oldWidget)
oldWidget->setVisible(false);
QWidget *currentTcWidget = current.isValid() ? m_model->widget(current) : 0;
m_container->setWidget(currentTcWidget);
m_container->setVisible(currentTcWidget != 0);
......
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