VirtualBox

儲存庫 vbox 的更動 66722


忽略:
時間撮記:
2017-4-28 下午02:40:46 (8 年 以前)
作者:
vboxsync
訊息:

FE/Qt: bugref:8847: Host Network Manager: Make sure current item always fetched in certain cases.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp

    r66721 r66722  
    521521        updateItemForNetworkHost(data, true, pItem);
    522522
     523        /* Make sure current item fetched: */
     524        sltHandleCurrentItemChange();
     525
    523526        /* Adjust tree-widget: */
    524527        sltAdjustTreeWidget();
     
    557560
    558561    /* Get item data: */
    559     UIDataHostNetwork data = *pChangedItem;
     562    UIDataHostNetwork oldData = *pChangedItem;
    560563
    561564    /* Make sure dhcp server status changed: */
    562     if (   (   data.m_dhcpserver.m_fEnabled
     565    if (   (   oldData.m_dhcpserver.m_fEnabled
    563566            && pChangedItem->checkState(Column_DHCP) == Qt::Checked)
    564         || (   !data.m_dhcpserver.m_fEnabled
     567        || (   !oldData.m_dhcpserver.m_fEnabled
    565568            && pChangedItem->checkState(Column_DHCP) == Qt::Unchecked))
    566569        return;
     
    570573
    571574    /* Find corresponding interface: */
    572     CHostNetworkInterface comInterface = comHost.FindHostNetworkInterfaceByName(data.m_interface.m_strName);
     575    CHostNetworkInterface comInterface = comHost.FindHostNetworkInterfaceByName(oldData.m_interface.m_strName);
    573576
    574577    /* Show error message if necessary: */
    575578    if (!comHost.isOk() || comInterface.isNull())
    576         msgCenter().cannotFindHostNetworkInterface(comHost, data.m_interface.m_strName, this);
     579        msgCenter().cannotFindHostNetworkInterface(comHost, oldData.m_interface.m_strName, this);
    577580    else
    578581    {
     
    600603                /* Save whether DHCP server is enabled: */
    601604                if (comServer.isOk())
    602                     comServer.SetEnabled(!data.m_dhcpserver.m_fEnabled);
     605                    comServer.SetEnabled(!oldData.m_dhcpserver.m_fEnabled);
    603606
    604607                /* Show error message if necessary: */
     
    607610                {
    608611                    /* Update interface in the tree: */
     612                    UIDataHostNetwork data;
    609613                    loadHostNetwork(comInterface, data);
    610614                    updateItemForNetworkHost(data, true, pChangedItem);
     615
     616                    /* Make sure current item fetched: */
     617                    sltHandleCurrentItemChange();
    611618
    612619                    /* Adjust tree-widget: */
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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