VirtualBox

Ignore:
Timestamp:
Sep 21, 2016 2:54:21 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:6899: Accessibility support (step 44): Selector UI: Rework for UIVMDesktop: Update snapshot pane even if machine is null.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp

    r63924 r63925  
    322322}
    323323
    324 void UIVMDesktop::updateSnapshots(UIVMItem *pVMItem, const CMachine& machine)
    325 {
    326     /* Update the snapshots header name: */
    327     QString name = tr("&Snapshots");
     324void UIVMDesktop::updateSnapshots(UIVMItem *pVMItem, const CMachine &comMachine)
     325{
     326    /* Update snapshot segment name: */
     327    QString strName = tr("&Snapshots");
    328328    if (pVMItem)
    329329    {
    330         ULONG count = pVMItem->snapshotCount();
     330        const ULONG count = pVMItem->snapshotCount();
    331331        if (count)
    332             name += QString(" (%1)").arg(count);
    333     }
    334     m_pHeaderBtn->setTitle(SegmentType_Snapshots, name);
    335 
    336     /* Refresh the snapshots widget: */
    337     if (!machine.isNull())
    338     {
     332            strName += QString(" (%1)").arg(count);
     333    }
     334    m_pHeaderBtn->setTitle(SegmentType_Snapshots, strName);
     335
     336    /* Update segmented-button availability: */
     337    if (comMachine.isNotNull())
    339338        m_pHeaderBtn->setEnabled(SegmentType_Snapshots, true);
    340         m_pSnapshotsPane->setMachine(machine);
    341     }
    342339    else
    343340        lockSnapshots();
     341
     342    /* Update snapshot pane: */
     343    m_pSnapshotsPane->setMachine(comMachine);
    344344}
    345345
Note: See TracChangeset for help on using the changeset viewer.

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