Changeset 43543 in vbox
- Timestamp:
- Oct 4, 2012 1:38:39 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 81146
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
r43540 r43543 112 112 if (model()->focusItem() == this) 113 113 { 114 /* Unset the focus /selection: */115 model()->setFocusItem(0 , true);116 } 117 /* If that item is NOT focused, butselected: */118 elseif (model()->currentItems().contains(this))114 /* Unset the focus: */ 115 model()->setFocusItem(0); 116 } 117 /* If that item is selected: */ 118 if (model()->currentItems().contains(this)) 119 119 { 120 120 /* Remove item from the selection list: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r43542 r43543 585 585 if (!machine.isNull()) 586 586 { 587 /* Add new machine 587 /* Add new machine-item: */ 588 588 addMachineIntoTheTree(machine, true); 589 589 /* And update model: */ … … 596 596 else 597 597 { 598 /* Remove machine 598 /* Remove machine-items with passed id: */ 599 599 removeMachineItems(strId, mainRoot()); 600 /* And update model: */600 /* Update model: */ 601 601 updateGroupTree(); 602 602 updateNavigation(); 603 603 updateLayout(); 604 if (mainRoot()->hasItems()) 604 /* Make sure focus-item present, if possible: */ 605 if (!focusItem() && currentItem()) 606 setFocusItem(currentItem()); 607 /* Make sure current-item present, if possible: */ 608 if (!currentItem() && !navigationList().isEmpty()) 605 609 setCurrentItem(0); 606 else607 unsetCurrentItem();610 /* Notify about current-item change: */ 611 notifyCurrentItemChanged(); 608 612 } 609 613 } … … 808 812 809 813 /* And update model: */ 810 updateGroupTree();811 814 updateNavigation(); 812 815 updateLayout(); 813 if (mainRoot()->hasItems()) 814 setCurrentItem(0); 815 else 816 unsetCurrentItem(); 816 setCurrentItem(0); 817 817 saveGroupSettings(); 818 818 }
Note:
See TracChangeset
for help on using the changeset viewer.