VirtualBox

Changeset 17766 in vbox


Ignore:
Timestamp:
Mar 12, 2009 5:07:21 PM (16 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: fix focus problems

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxVMSettingsHD.h

    r13580 r17766  
    379379    QUuid getWithNewHDWizard();
    380380    int maxNameLength() const;
     381    void removeFocus();
    381382
    382383    /* variables */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp

    r17669 r17766  
    942942void VBoxVMSettingsHD::onSATACheckToggled (int aState)
    943943{
     944    removeFocus();
    944945    if (aState == Qt::Unchecked)
    945946    {
     
    964965            else
    965966            {
     967                removeFocus();
    966968                /* Delete SATA items */
    967969                mModel->removeSata();
     
    983985void VBoxVMSettingsHD::onShowDiffsCheckToggled (int aState)
    984986{
     987    removeFocus();
    985988    HDSettings::instance()->setShowDiffs (aState == Qt::Checked);
    986989}
     
    11331136}
    11341137
     1138void VBoxVMSettingsHD::removeFocus()
     1139{
     1140#ifdef Q_WS_MAC
     1141    /* On the Mac checkboxes aren't focus aware. Therewith a editor widget get
     1142     * not closed by clicking on the checkbox. As a result the content of the
     1143     * currently used editor (QComboBox) isn't updated. So manually remove the
     1144     * focus to force the closing of any open editor widget. */
     1145    QWidget *focusWidget = qApp->focusWidget();
     1146    if (focusWidget)
     1147        focusWidget->clearFocus();
     1148#endif /* Q_WS_MAC */
     1149}
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