MCPcopy Create free account
hub / github.com/MultiMC/Launcher / refreshContainer

Method refreshContainer

launcher/ui/widgets/PageContainer.cpp:111–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111void PageContainer::refreshContainer()
112{
113 m_proxyModel->invalidate();
114 if(!m_currentPage->shouldDisplay())
115 {
116 auto index = m_proxyModel->index(0, 0);
117 if(index.isValid())
118 {
119 m_pageList->setCurrentIndex(index);
120 }
121 else
122 {
123 // FIXME: unhandled corner case: what to do when there's no page to select?
124 }
125 }
126}
127
128void PageContainer::createUI()
129{

Calls 4

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

Tested by

no test coverage detected