| 117 | } |
| 118 | |
| 119 | void DockManager::switchToLayout(DockLayout::Index layout_index, bool blink_tab) |
| 120 | { |
| 121 | if (layout_index != m_current_layout) |
| 122 | { |
| 123 | if (m_current_layout != DockLayout::INVALID_INDEX) |
| 124 | { |
| 125 | DockLayout& layout = m_layouts.at(m_current_layout); |
| 126 | layout.freeze(); |
| 127 | layout.save(m_current_layout); |
| 128 | } |
| 129 | |
| 130 | // Clear out the existing positions of toolbars so they don't affect |
| 131 | // where new toolbars appear for other layouts. |
| 132 | if (g_debugger_window) |
| 133 | g_debugger_window->clearToolBarState(); |
| 134 | |
| 135 | updateToolBarLockState(); |
| 136 | |
| 137 | m_current_layout = layout_index; |
| 138 | |
| 139 | if (m_current_layout != DockLayout::INVALID_INDEX) |
| 140 | { |
| 141 | DockLayout& layout = m_layouts.at(m_current_layout); |
| 142 | layout.thaw(); |
| 143 | |
| 144 | int tab_index = static_cast<int>(layout_index); |
| 145 | if (tab_index >= 0 && m_menu_bar) |
| 146 | m_menu_bar->onCurrentLayoutChanged(layout_index); |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | if (blink_tab && m_menu_bar) |
| 151 | m_menu_bar->startBlink(m_current_layout); |
| 152 | } |
| 153 | |
| 154 | bool DockManager::switchToLayoutWithCPU(BreakPointCpu cpu, bool blink_tab) |
| 155 | { |
no test coverage detected