VirtualBox

Changeset 79440 in vbox


Ignore:
Timestamp:
Jul 1, 2019 2:52:03 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
131694
Message:

FE/Qt: bugref:6143. Preventing redundant calls during layout change

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r79437 r79440  
    11341134    if (!pItem || pItem == m_pLayoutListWidget->currentItem())
    11351135        return;
     1136    m_pLayoutListWidget->blockSignals(true);
    11361137    m_pLayoutListWidget->setCurrentItem(pItem);
     1138    m_pLayoutListWidget->blockSignals(false);
    11371139}
    11381140
     
    11511153    if (!m_pLayoutListWidget || layoutNames.size() != layoutUidList.size())
    11521154        return;
     1155    QUuid currentItemUid;
     1156    if (m_pLayoutListWidget->currentItem())
     1157        currentItemUid = m_pLayoutListWidget->currentItem()->data(Qt::UserRole).toUuid();
     1158    m_pLayoutListWidget->blockSignals(true);
    11531159    m_pLayoutListWidget->clear();
    11541160    for (int i = 0; i < layoutNames.size(); ++i)
     
    11571163        pItem->setData(Qt::UserRole, layoutUidList[i]);
    11581164        m_pLayoutListWidget->addItem(pItem);
    1159     }
     1165        if (layoutUidList[i] == currentItemUid)
     1166            m_pLayoutListWidget->setCurrentItem(pItem);
     1167    }
     1168    m_pLayoutListWidget->blockSignals(false);
    11601169}
    11611170
     
    12051214    pLayout->addWidget(m_pLayoutListWidget);
    12061215    connect(m_pLayoutListWidget, &QListWidget::currentItemChanged, this, &UILayoutSelector::sltCurrentItemChanged);
     1216
    12071217    m_pLayoutListWidget->setSelectionMode(QAbstractItemView::SingleSelection);
    12081218    QHBoxLayout *pButtonsLayout = new QHBoxLayout;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette