| 477 | } |
| 478 | |
| 479 | std::shared_ptr<WindowTab> MainWindow::removeTab( |
| 480 | int section, int tab, bool* wasCurrentTab, |
| 481 | bool* wasCurrentSection) noexcept { |
| 482 | const ui::Data& d = mWindow->global<ui::Data>(); |
| 483 | const int currentSection = d.get_current_section_index(); |
| 484 | if (wasCurrentSection) { |
| 485 | *wasCurrentSection = (section == currentSection); |
| 486 | } |
| 487 | if (auto s = mSections->value(section)) { |
| 488 | return s->removeTab(tab, wasCurrentTab); |
| 489 | } |
| 490 | return nullptr; |
| 491 | } |
| 492 | |
| 493 | void MainWindow::showPanelPage(ui::PanelPage page) noexcept { |
| 494 | mWindow->global<ui::Data>().fn_set_panel_page(page); |
no test coverage detected