Changeset 92552 in vbox
- Timestamp:
- Nov 22, 2021 3:44:57 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 148433
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r92413 r92552 1804 1804 } 1805 1805 1806 void UIMachineLogic::sltReset(bool fShowConfirmation /* = true */) 1807 { 1808 if (fShowConfirmation) 1809 { 1810 /* Confirm/Reset current console: */ 1811 if (msgCenter().confirmResetMachine(machineName())) 1812 console().Reset(); 1813 } 1814 else 1815 console().Reset(); 1816 1817 /* TODO_NEW_CORE: On reset the additional screens didn't get a display 1818 update. Emulate this for now until it get fixed. */ 1819 ulong uMonitorCount = machine().GetGraphicsAdapter().GetMonitorCount(); 1820 for (ulong uScreenId = 1; uScreenId < uMonitorCount; ++uScreenId) 1821 machineWindows().at(uScreenId)->update(); 1806 void UIMachineLogic::sltReset() 1807 { 1808 reset(true); 1822 1809 } 1823 1810 … … 3266 3253 UIBootFailureDialog *pBootFailureDialog = new UIBootFailureDialog(activeMachineWindow(), machine()); 3267 3254 AssertPtrReturnVoid(pBootFailureDialog); 3268 connect(actionPool()->action(UIActionIndexRT_M_Machine_S_Reset), &UIAction::triggered,3269 this, &UIMachineLogic::sltReset);3270 3255 3271 3256 int iResult = pBootFailureDialog->exec(false); … … 3279 3264 3280 3265 if (iResult == static_cast<int>(UIBootFailureDialog::ReturnCode_Reset)) 3281 sltReset(false);3266 reset(false); 3282 3267 } 3283 3268 … … 3396 3381 } 3397 3382 3383 void UIMachineLogic::reset(bool fShowConfirmation) 3384 { 3385 if (fShowConfirmation) 3386 { 3387 /* Confirm/Reset current console: */ 3388 if (msgCenter().confirmResetMachine(machineName())) 3389 console().Reset(); 3390 } 3391 else 3392 console().Reset(); 3393 3394 /* TODO_NEW_CORE: On reset the additional screens didn't get a display 3395 update. Emulate this for now until it get fixed. */ 3396 ulong uMonitorCount = machine().GetGraphicsAdapter().GetMonitorCount(); 3397 for (ulong uScreenId = 1; uScreenId < uMonitorCount; ++uScreenId) 3398 machineWindows().at(uScreenId)->update(); 3399 } 3400 3398 3401 #endif /* VBOX_WITH_DEBUGGER_GUI */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r91759 r92552 272 272 void sltShowFileManagerDialog(); 273 273 void sltCloseFileManagerDialog(); 274 void sltReset( bool fShowConfirmation = true);274 void sltReset(); 275 275 void sltPause(bool fOn); 276 276 void sltDetach(); … … 390 390 /** Attempts to mount medium with @p uMediumId to the machine if it can find an appropriate controller and port. */ 391 391 bool mountBootMedium(const QUuid &uMediumId); 392 /** Resets the machine. If @p fShowConfirmation is true then a confirmation messag box is shown first. */ 393 void reset(bool fShowConfirmation); 392 394 393 395 /* Private variables: */
Note:
See TracChangeset
for help on using the changeset viewer.