Changeset 92029 in vbox
- Timestamp:
- Oct 25, 2021 12:05:29 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147838
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp
r91348 r92029 433 433 434 434 /* If global item is currently chosen, selection should be invalidated: */ 435 if (firstSelectedItem() ->type() == UIChooserNodeType_Global)435 if (firstSelectedItem() && firstSelectedItem()->type() == UIChooserNodeType_Global) 436 436 emit sigSelectionInvalidated(); 437 437 } … … 1153 1153 { 1154 1154 /* Rebuild tree for main root: */ 1155 buildTreeForMainRoot(false /* preserve selection */); 1156 /* Select newly added item: */ 1157 setSelectedItem(root()->searchForItem(uMachineId.toString(), 1158 UIChooserItemSearchFlag_Machine | 1159 UIChooserItemSearchFlag_ExactId)); 1155 buildTreeForMainRoot(true /* preserve selection */); 1156 /* Search for newly added item: */ 1157 UIChooserItem *pNewItem = root()->searchForItem(uMachineId.toString(), 1158 UIChooserItemSearchFlag_Machine | 1159 UIChooserItemSearchFlag_ExactId); 1160 /* Select newly added item if any: */ 1161 if (pNewItem) 1162 setSelectedItem(pNewItem); 1160 1163 } 1161 1164 }
Note:
See TracChangeset
for help on using the changeset viewer.