MCPcopy Create free account
hub / github.com/FreesmTeam/FreesmLauncher / suggestCurrent

Method suggestCurrent

launcher/ui/pages/modplatform/CustomPage.cpp:187–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187void CustomPage::suggestCurrent()
188{
189 if (!isOpened) {
190 return;
191 }
192
193 if (!m_selectedVersion) {
194 dialog->setSuggestedPack();
195 return;
196 }
197
198 // There isn't a selected version if the version list is empty
199 if (ui->loaderVersionList->selectedVersion() == nullptr)
200 dialog->setSuggestedPack(m_selectedVersion->descriptor(), new VanillaCreationTask(m_selectedVersion));
201 else {
202 dialog->setSuggestedPack(m_selectedVersion->descriptor(),
203 new VanillaCreationTask(m_selectedVersion, m_selectedLoader, m_selectedLoaderVersion));
204 }
205 dialog->setSuggestedIcon("default");
206}
207
208void CustomPage::setSelectedVersion(BaseVersion::Ptr version)
209{

Callers

nothing calls this directly

Calls 4

setSuggestedPackMethod · 0.80
setSuggestedIconMethod · 0.80
selectedVersionMethod · 0.45
descriptorMethod · 0.45

Tested by

no test coverage detected