VirtualBox

Changeset 12036 in vbox for trunk


Ignore:
Timestamp:
Sep 3, 2008 12:51:29 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
35963
Message:

Fe/Qt4: Fixed VM Settings / HD Page => select vdi through vdm.

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

Legend:

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

    r12021 r12036  
    295295signals:
    296296
    297     void signalToCloseEditor (QWidget *aEditor,
    298                               QAbstractItemDelegate::EndEditHint aCloseHint);
    299297    void hdChanged();
    300298
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxVMSettingsHD.cpp

    r12021 r12036  
    500500             SIGNAL (mediaRemoved (VBoxDefs::DiskType, const QUuid &)),
    501501             this, SLOT (onMediaRemoved (VBoxDefs::DiskType, const QUuid &)));
    502     connect (this, SIGNAL (signalToCloseEditor (QWidget*, QAbstractItemDelegate::EndEditHint)),
    503              mTwAts, SLOT (closeEditor (QWidget*, QAbstractItemDelegate::EndEditHint)));
    504502
    505503    /* Install global event filter */
     
    678676        editor->tryToChooseUniqueVdi (vdis);
    679677
     678        /* Move the focus to the other than attachment table location.
     679         * This will close the temporary editor of this table to prevent
     680         * influencing the media enumeration mechanism to model data. */
     681        mCbSATA->setFocus();
     682        qApp->processEvents();
     683
    680684        /* Ask the user for method to add new vdi */
    681685        int result = mModel->rowCount() - 1 > editor->count() ?
     
    684688        if (result == QIMessageBox::Yes)
    685689        {
    686             /* Close the editor to avoid it's infliction to data model */
    687             emit signalToCloseEditor (HDVdiEditor::activeEditor(),
    688                                       QAbstractItemDelegate::NoHint);
    689 
    690690            /* Run new HD wizard */
    691691            VBoxNewHDWzd dlg (this);
     
    703703        else if (result == QIMessageBox::No)
    704704            vdmClicked();
     705
     706        /* Move the focus to the attachment table location again. */
     707        mTwAts->setFocus();
    705708    }
    706709}
     
    741744    Assert (mTwAts->currentIndex().isValid());
    742745
    743     /* Close the editor to avoid it's infliction to data model */
    744     emit signalToCloseEditor (HDVdiEditor::activeEditor(),
    745                               QAbstractItemDelegate::NoHint);
     746    /* Move the focus to the other than attachment table location.
     747     * This will close the temporary editor of this table to prevent
     748     * influencing the media enumeration mechanism to model data. */
     749    mCbSATA->setFocus();
     750    qApp->processEvents();
    746751
    747752    HDVdiValue oldVdi (mModel->data (mTwAts->currentIndex(), Qt::EditRole)
     
    764769
    765770    vboxGlobal().startEnumeratingMedia();
     771
     772    /* Move the focus to the attachment table location again. */
     773    mTwAts->setFocus();
    766774}
    767775
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