VirtualBox

Ignore:
Timestamp:
May 20, 2015 7:40:04 PM (10 years ago)
Author:
vboxsync
Message:

FE/Qt: 7848: Fixing potential crash: Before removing, chooser-pane-item should be cleared from 'current' and 'focused' flags.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp

    r55914 r55985  
    542542        return;
    543543
     544    /* Exclude itself from the current items: */
     545    if (model()->currentItems().contains(this))
     546        model()->removeFromCurrentItems(this);
     547    /* Move the focus item to the first available current after that: */
     548    if (model()->focusItem() == this && !model()->currentItems().isEmpty())
     549        model()->setFocusItem(model()->currentItems().first());
     550
    544551    /* Remove item: */
    545552    delete this;
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