VirtualBox

Changeset 77313 in vbox


Ignore:
Timestamp:
Feb 14, 2019 3:45:36 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128840
Message:

FE/Qt: bugref:9241: VirtualBox Manager UI: Simplify Chooser pane selection change handler.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r77027 r77313  
    204204{
    205205    /* Make sure chosen item fetched: */
    206     sltHandleChooserPaneIndexChange(false /* update details? */, false /* update snapshots? */, false /* update the logviewer? */);
     206    sltHandleChooserPaneIndexChange();
    207207
    208208#ifdef VBOX_WS_MAC
     
    216216}
    217217
    218 void UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange(bool fUpdateDetails /* = true */,
    219                                                                 bool fUpdateSnapshots /* = true */,
    220                                                                 bool fUpdateLogs /* = true */)
     218void UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange()
    221219{
    222220    /* Let the parent know: */
     
    267265                sltHandleToolsPaneIndexChange();
    268266
    269             /* Propagate current items to update the Details-pane (if requested): */
    270             if (fUpdateDetails)
    271                 m_pPaneToolsMachine->setItems(currentItems());
    272             /* Propagate current machine to update the Snapshots-pane or/and Logviewer-pane (if requested): */
    273             if (fUpdateSnapshots || fUpdateLogs)
    274                 m_pPaneToolsMachine->setMachine(pItem->machine());
     267            /* Propagate current items to update the Details-pane: */
     268            m_pPaneToolsMachine->setItems(currentItems());
     269            /* Propagate current machine to update the Snapshots-pane or/and Logviewer-pane: */
     270            m_pPaneToolsMachine->setMachine(pItem->machine());
    275271        }
    276272        else
     
    310306    }
    311307    /* Then handle current item change (again!): */
    312     sltHandleChooserPaneIndexChangeDefault();
     308    sltHandleChooserPaneIndexChange();
    313309}
    314310
     
    529525    /* Chooser-pane connections: */
    530526    connect(m_pPaneChooser, &UIChooser::sigSelectionChanged,
    531             this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChangeDefault);
     527            this, &UIVirtualBoxManagerWidget::sltHandleChooserPaneIndexChange);
    532528    connect(m_pPaneChooser, &UIChooser::sigSlidingStarted,
    533529            m_pPaneToolsMachine, &UIToolPaneMachine::sigSlidingStarted);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r76581 r77313  
    145145    /** @name Common stuff.
    146146      * @{ */
    147         /** Handles signal about Chooser-pane index change.
    148           * @param  fUpdateDetails    Brings whether details should be updated.
    149           * @param  fUpdateSnapshots  Brings whether snapshots should be updated.
    150           * @param  fUpdateLogs       Brings whether log-viewer should be updated. */
    151         void sltHandleChooserPaneIndexChange(bool fUpdateDetails = true,
    152                                              bool fUpdateSnapshots = true,
    153                                              bool fUpdateLogs = true);
    154         /** Handles signal about Chooser-pane index change the default way. */
    155         void sltHandleChooserPaneIndexChangeDefault() { sltHandleChooserPaneIndexChange(); }
     147        /** Handles signal about Chooser-pane index change. */
     148        void sltHandleChooserPaneIndexChange();
    156149
    157150        /** Handles sliding animation complete signal.
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