VirtualBox

Changeset 67250 in vbox for trunk


Ignore:
Timestamp:
Jun 2, 2017 3:39:58 PM (8 years ago)
Author:
vboxsync
Message:

FE/Qt: Selector UI: Virtual Media Manager: Make sure tree-widget is initially focused, not tab-widget.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r67088 r67250  
    817817}
    818818
     819void UIMediumManagerWidget::showEvent(QShowEvent *pEvent)
     820{
     821    /* Call to base-class: */
     822    QIWithRetranslateUI<QWidget>::showEvent(pEvent);
     823
     824    /* Focus current tree-widget: */
     825    if (currentTreeWidget())
     826        currentTreeWidget()->setFocus();
     827}
     828
    819829void UIMediumManagerWidget::sltHandleMediumCreated(const QString &strMediumID)
    820830{
     
    12761286        /* Add tab-widget into central layout: */
    12771287        layout()->addWidget(m_pTabWidget);
    1278         /* Focus current tree-widget: */
    1279         if (currentTreeWidget())
    1280             currentTreeWidget()->setFocus();
    12811288        /* Update other widgets according chosen tab: */
    12821289        sltHandleCurrentTabChanged();
     
    23132320        setWidgetToolbar(pWidget->toolbar());
    23142321#endif
    2315         /* Add to layout: */
     2322        /* Add into layout: */
    23162323        centralWidget()->layout()->addWidget(pWidget);
    23172324    }
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.h

    r67122 r67250  
    7878        /** Handles translation event. */
    7979        virtual void retranslateUi() /* override */;
     80
     81        /** Handles @a pShow event. */
     82        virtual void showEvent(QShowEvent *pEvent) /* override */;
    8083    /** @} */
    8184
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