Changeset 88251 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 22, 2021 4:49:33 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsHandlerKeyboard.cpp
r82968 r88251 65 65 { 66 66 if (pEvent->key() == Qt::Key_Up) 67 pPreviousItem = model()->navigationList().at(iPosition - 1); 67 for (int i = iPosition - 1; i >= 0; --i) 68 { 69 UIToolsItem *pIteratedItem = model()->navigationList().at(i); 70 if (pIteratedItem->isEnabled()) 71 { 72 pPreviousItem = pIteratedItem; 73 break; 74 } 75 } 68 76 else if (pEvent->key() == Qt::Key_Home) 69 77 pPreviousItem = model()->navigationList().first(); … … 91 99 { 92 100 if (pEvent->key() == Qt::Key_Down) 93 pNextItem = model()->navigationList().at(iPosition + 1); 101 for (int i = iPosition + 1; i < model()->navigationList().size(); ++i) 102 { 103 UIToolsItem *pIteratedItem = model()->navigationList().at(i); 104 if (pIteratedItem->isEnabled()) 105 { 106 pNextItem = pIteratedItem; 107 break; 108 } 109 } 94 110 else if (pEvent->key() == Qt::Key_End) 95 111 pNextItem = model()->navigationList().last(); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsHandlerMouse.cpp
r82968 r88251 63 63 UIToolsItem *pClickedItem = qgraphicsitem_cast<UIToolsItem*>(pItemUnderMouse); 64 64 /* Make clicked item the current one: */ 65 if (pClickedItem )65 if (pClickedItem && pClickedItem->isEnabled()) 66 66 { 67 67 model()->setCurrentItem(pClickedItem);
Note:
See TracChangeset
for help on using the changeset viewer.