Changeset 107284 in vbox
- Timestamp:
- Dec 11, 2024 11:06:49 AM (5 weeks ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r107279 r107284 399 399 } 400 400 401 void UIVirtualBoxManagerWidget::sltHandle StateChange(const QUuid &uId)401 void UIVirtualBoxManagerWidget::sltHandleMachineStateChange(const QUuid &uId) 402 402 { 403 403 // WORKAROUND: … … 503 503 recacheCurrentMachineItemInformation(); 504 504 505 /* Calculate new selection type : */505 /* Calculate new selection type and item accessibility status: */ 506 506 const SelectionType enmSelectedItemType = selectionType(); 507 /* Calculate new item accessibility status: */508 507 const bool fCurrentItemIsOk = isItemAccessible(); 509 508 … … 557 556 { 558 557 /* Not for global items: */ 559 if (!isGlobalItemSelected()) 560 { 561 /* Acquire current item: */ 562 UIVirtualMachineItem *pItem = currentItem(); 563 const bool fCurrentItemIsOk = isItemAccessible(pItem); 564 565 /* If current item is Ok: */ 566 if (fCurrentItemIsOk) 558 if (isGlobalItemSelected()) 559 return; 560 561 /* Acquire current item: */ 562 UIVirtualMachineItem *pItem = currentItem(); 563 const bool fCurrentItemIsOk = isItemAccessible(pItem); 564 565 /* If current item is Ok: */ 566 if (fCurrentItemIsOk) 567 { 568 /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */ 569 if (m_pPaneToolsMachine->currentTool() == UIToolType_Error) 570 switchMachineToolTo(m_pMenuToolsMachine->toolsType()); 571 572 /* If we still have same item selected: */ 573 if (pItem && pItem->id() == uId) 567 574 { 568 /* If Error-pane is chosen currently => switch to tool currently chosen in Tools-menu: */ 569 if (m_pPaneToolsMachine->currentTool() == UIToolType_Error) 570 switchMachineToolTo(m_pMenuToolsMachine->toolsType()); 571 572 /* If we still have same item selected: */ 573 if (pItem && pItem->id() == uId) 574 { 575 /* Propagate current items to update the Details-pane: */ 576 m_pPaneToolsMachine->setItems(currentItems()); 577 } 575 /* Propagate current items to update the Details-pane: */ 576 m_pPaneToolsMachine->setItems(currentItems()); 578 577 } 579 else 578 } 579 else 580 { 581 /* Make sure Error pane raised: */ 582 if (m_pPaneToolsMachine->currentTool() != UIToolType_Error) 583 m_pPaneToolsMachine->openTool(UIToolType_Error); 584 585 /* If we still have same item selected: */ 586 if (pItem && pItem->id() == uId) 580 587 { 581 /* Make sure Error pane raised: */ 582 if (m_pPaneToolsMachine->currentTool() != UIToolType_Error) 583 m_pPaneToolsMachine->openTool(UIToolType_Error); 584 585 /* If we still have same item selected: */ 586 if (pItem && pItem->id() == uId) 587 { 588 /* Propagate current items to update the Details-pane (in any case): */ 589 m_pPaneToolsMachine->setItems(currentItems()); 590 /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */ 591 m_pPaneToolsMachine->setErrorDetails(pItem->accessError()); 592 } 588 /* Propagate current items to update the Details-pane (in any case): */ 589 m_pPaneToolsMachine->setItems(currentItems()); 590 /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */ 591 m_pPaneToolsMachine->setErrorDetails(pItem->accessError()); 593 592 } 594 595 /* Pass the signal further: */ 596 emit sigCloudMachineStateChange(uId);597 }593 } 594 595 /* Pass the signal further: */ 596 emit sigCloudMachineStateChange(uId); 598 597 } 599 598 … … 828 827 /* Global VBox event handlers: */ 829 828 connect(gVBoxEvents, &UIVirtualBoxEventHandler::sigMachineStateChange, 830 this, &UIVirtualBoxManagerWidget::sltHandle StateChange);829 this, &UIVirtualBoxManagerWidget::sltHandleMachineStateChange); 831 830 832 831 /* Global VBox extra-data event handlers: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h
r107279 r107284 281 281 * @{ */ 282 282 /** Handles CVirtualBox event about state change for machine with @a uId. */ 283 void sltHandle StateChange(const QUuid &uId);283 void sltHandleMachineStateChange(const QUuid &uId); 284 284 /** @} */ 285 285 … … 364 364 /** @} */ 365 365 366 /** @name Commonstuff.366 /** @name Tools stuff. 367 367 * @{ */ 368 368 /** Recaches current machine item information. 369 369 * @param fDontRaiseErrorPane Brings whether we should not raise error-pane. */ 370 370 void recacheCurrentMachineItemInformation(bool fDontRaiseErrorPane = false); 371 /** @} */ 372 373 /** @name Tools stuff. 374 * @{ */ 371 375 372 /** Updates Global tools menu. */ 376 373 void updateToolsMenuGlobal();
Note:
See TracChangeset
for help on using the changeset viewer.