VirtualBox

Changeset 78294 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Apr 25, 2019 11:13:31 AM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9241: Each time we move focus to to global item as a fallback mean we risk previous item to be removed silently (thus becoming stale as a result), so we should invalidate machine selection to avoid further crash in machine Details pane.

File:
1 edited

Legend:

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

    r77948 r78294  
    637637        /* Make sure selected-item present, if possible: */
    638638        if (!firstSelectedItem() && !navigationItems().isEmpty())
     639        {
    639640            setSelectedItem(navigationItems().first());
     641            emit sigSelectionInvalidated();
     642        }
    640643        /* Make sure current-item present, if possible: */
    641644        else if (!currentItem() && firstSelectedItem())
     
    687690        /* Make sure at least one item selected after that: */
    688691        if (!firstSelectedItem() && !navigationItems().isEmpty())
     692        {
    689693            setSelectedItem(navigationItems().first());
     694            emit sigSelectionInvalidated();
     695        }
    690696    }
    691697
     
    812818    delete pCurrentNode;
    813819
    814     /* Notify about selection invalidated: */
    815     emit sigSelectionInvalidated();
    816 
    817820    /* And update model: */
    818821    updateNavigationItemList();
     
    824827    }
    825828    else
     829    {
    826830        setSelectedItem(navigationItems().first());
     831        emit sigSelectionInvalidated();
     832    }
    827833    saveGroupSettings();
    828834}
     
    12671273    setSelectedItem(gEDataManager->selectorWindowLastItemChosen());
    12681274    if (!firstSelectedItem() && !navigationItems().isEmpty())
     1275    {
    12691276        setSelectedItem(navigationItems().first());
     1277        emit sigSelectionInvalidated();
     1278    }
    12701279}
    12711280
     
    14851494    updateLayout();
    14861495    if (!navigationItems().isEmpty())
     1496    {
    14871497        setSelectedItem(navigationItems().first());
     1498        emit sigSelectionInvalidated();
     1499    }
    14881500    else
    14891501        clearSelectedItems();
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