- Timestamp:
- Sep 17, 2018 5:45:41 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r74305 r74320 2144 2144 actionPool()->action(UIActionIndexST_M_Machine_T_Pause)->retranslateUi(); 2145 2145 actionPool()->action(UIActionIndexST_M_Machine_T_Pause)->blockSignals(false); 2146 2147 /* Enable/disable tools actions: */2148 actionPool()->action(UIActionIndexST_M_Tools_M_Machine)->setEnabled(isActionEnabled(UIActionIndexST_M_Tools_M_Machine, items));2149 actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Details)->setEnabled(isActionEnabled(UIActionIndexST_M_Tools_M_Machine_S_Details, items));2150 actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots)->setEnabled(isActionEnabled(UIActionIndexST_M_Tools_M_Machine_S_Snapshots, items));2151 actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer)->setEnabled(isActionEnabled(UIActionIndexST_M_Tools_M_Machine_S_LogViewer, items));2152 2146 } 2153 2147 … … 2276 2270 { 2277 2271 return isActionEnabled(UIActionIndexST_M_Machine_M_Close, items); 2278 }2279 case UIActionIndexST_M_Tools_M_Machine:2280 case UIActionIndexST_M_Tools_M_Machine_S_Details:2281 case UIActionIndexST_M_Tools_M_Machine_S_Snapshots:2282 case UIActionIndexST_M_Tools_M_Machine_S_LogViewer:2283 {2284 return pItem->accessible();2285 2272 } 2286 2273 default: -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r74319 r74320 219 219 && m_pStackedWidget->currentWidget() != m_pPaneToolsGlobal) 220 220 { 221 /* Just start animation and return, do nothing else.. */ 221 222 m_pStackedWidget->setCurrentWidget(m_pPaneToolsGlobal); // rendering w/a 222 223 m_pStackedWidget->setCurrentWidget(m_pSlidingAnimation); 223 224 m_pSlidingAnimation->animate(SlidingDirection_Reverse); 225 return; 224 226 } 225 227 … … 228 230 /* If machine or group item is selected and we are on global tools pane => switch to machine tools pane: */ 229 231 if ( (isMachineItemSelected() || isGroupItemSelected()) 230 && m_pStackedWidget->currentWidget() != m_pPaneToolsMachine) 231 { 232 && m_pStackedWidget->currentWidget() != m_pPaneToolsMachine) 233 { 234 /* Just start animation and return, do nothing else.. */ 232 235 m_pStackedWidget->setCurrentWidget(m_pPaneToolsMachine); // rendering w/a 233 236 m_pStackedWidget->setCurrentWidget(m_pSlidingAnimation); 234 237 m_pSlidingAnimation->animate(SlidingDirection_Forward); 238 return; 235 239 } 236 240 … … 255 259 /* Make sure Details or Snapshot pane is chosen if opened: */ 256 260 if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Details)) 257 actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Details)->trigger();261 switchToTool(ToolTypeMachine_Details); 258 262 else 259 263 if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_Snapshots)) 260 actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_Snapshots)->trigger();264 switchToTool(ToolTypeMachine_Snapshots); 261 265 else 262 266 if (m_pPaneToolsMachine->isToolOpened(ToolTypeMachine_LogViewer)) 263 actionPool()->action(UIActionIndexST_M_Tools_M_Machine_S_LogViewer)->trigger();267 switchToTool(ToolTypeMachine_LogViewer); 264 268 } 265 269 … … 296 300 void UIVirtualBoxManagerWidget::sltHandleSlidingAnimationComplete(SlidingDirection enmDirection) 297 301 { 302 /* First switch the panes: */ 298 303 switch (enmDirection) 299 304 { … … 311 316 } 312 317 } 318 /* Then handle current item change (again!): */ 319 sltHandleChooserPaneIndexChangeDefault(); 313 320 } 314 321
Note:
See TracChangeset
for help on using the changeset viewer.