| 530 | } |
| 531 | |
| 532 | void WorkspaceControl::Command_NextItem(const MyGUI::UString& _commandName, bool& _result) |
| 533 | { |
| 534 | if (!checkCommand()) |
| 535 | return; |
| 536 | |
| 537 | MyGUI::TabControl* tab = nullptr; |
| 538 | |
| 539 | if (mCurrentWidget != nullptr) |
| 540 | { |
| 541 | if (mCurrentWidget->isType<MyGUI::TabControl>()) |
| 542 | tab = mCurrentWidget->castType<MyGUI::TabControl>(); |
| 543 | else if (mCurrentWidget->getParent() != nullptr && mCurrentWidget->getParent()->isType<MyGUI::TabControl>()) |
| 544 | tab = mCurrentWidget->getParent()->castType<MyGUI::TabControl>(); |
| 545 | } |
| 546 | |
| 547 | if (tab == nullptr) |
| 548 | return; |
| 549 | |
| 550 | if (tab->getItemCount() == 0) |
| 551 | return; |
| 552 | |
| 553 | size_t sheet = tab->getIndexSelected(); |
| 554 | sheet++; |
| 555 | if (sheet >= tab->getItemCount()) |
| 556 | sheet = 0; |
| 557 | if (tab->getItemCount()) |
| 558 | tab->setIndexSelected(sheet); |
| 559 | |
| 560 | WidgetSelectorManager::getInstance().setSelectedWidget(tab->getItemSelected()); |
| 561 | |
| 562 | _result = true; |
| 563 | } |
| 564 | |
| 565 | void WorkspaceControl::Command_FreeChildMode(const MyGUI::UString& _commandName, bool& _result) |
| 566 | { |
nothing calls this directly
no test coverage detected