MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / refreshContainer

Method refreshContainer

launcher/ui/widgets/PageContainer.cpp:133–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131}
132
133void PageContainer::refreshContainer()
134{
135 m_proxyModel->invalidate();
136 if(!m_currentPage->shouldDisplay())
137 {
138 auto index = m_proxyModel->index(0, 0);
139 if(index.isValid())
140 {
141 m_pageList->setCurrentIndex(index);
142 }
143 else
144 {
145 // FIXME: unhandled corner case: what to do when there's no page to select?
146 }
147 }
148}
149
150void PageContainer::createUI()
151{

Calls 4

invalidateMethod · 0.80
shouldDisplayMethod · 0.45
indexMethod · 0.45
isValidMethod · 0.45

Tested by

no test coverage detected