MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / switchToLayout

Method switchToLayout

pcsx2-qt/Debugger/Docking/DockManager.cpp:119–152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119void 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
154bool DockManager::switchToLayoutWithCPU(BreakPointCpu cpu, bool blink_tab)
155{

Callers 1

DebuggerWindowMethod · 0.80

Calls 7

atMethod · 0.80
freezeMethod · 0.80
clearToolBarStateMethod · 0.80
thawMethod · 0.80
startBlinkMethod · 0.80
saveMethod · 0.45

Tested by

no test coverage detected