VirtualBox

Ignore:
Timestamp:
Jun 15, 2017 11:10:02 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
116149
Message:

FE/Qt: Selector UI: Make sure segmented-button is updated when corresponding stacked-widget is.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
4 edited

Legend:

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

    r67419 r67422  
    247247        /* Make sure at least Details-pane raised: */
    248248        if (m_pContainerDetails->currentWidget() == m_pPaneDesktop)
    249             m_pContainerDetails->setCurrentWidget(m_pPaneDetails);
     249            sltPerformSegmentedButtonSwitch(SegmentType_Details);
    250250
    251251        /* Refresh Tools-pane if requested: */
     
    257257        /* Make sure Desktop-pane raised: */
    258258        if (m_pContainerDetails->currentWidget() != m_pPaneDesktop)
    259             m_pContainerDetails->setCurrentWidget(m_pPaneDesktop);
     259            sltPerformSegmentedButtonSwitch(SegmentType_None);
    260260
    261261        /* Note that the machine becomes inaccessible (or if the last VM gets
     
    10851085{
    10861086    /* Perform silent segmented-button switch: */
    1087     m_pSegmentedButton->setSelected(iSegment);
     1087    if (iSegment >= 0 && iSegment < m_pSegmentedButton->count())
     1088        m_pSegmentedButton->setSelected(iSegment);
    10881089    /* Manually handle that switch as well: */
    10891090    sltHandleSegmentedButtonSwitch(iSegment);
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.h

    r67419 r67422  
    5656        SegmentType_Details,
    5757        SegmentType_Tools,
     58        SegmentType_None,
    5859    };
    5960
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.cpp

    r63962 r67422  
    269269}
    270270
     271int UIRoundRectSegmentedButton::count() const
     272{
     273    return m_pButtons.size();
     274}
     275
    271276void UIRoundRectSegmentedButton::setTitle(int iSegment, const QString &aTitle)
    272277{
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UISpecialControls.h

    r63962 r67422  
    231231    ~UIRoundRectSegmentedButton();
    232232
     233    int count() const;
     234
    233235    void setTitle(int iSegment, const QString &aTitle);
    234236    void setToolTip(int iSegment, const QString &strTip);
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