MCPcopy Create free account
hub / github.com/ModOrganizer2/modorganizer / selectActiveInstance

Method selectActiveInstance

src/instancemanagerdialog.cpp:335–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

333}
334
335void InstanceManagerDialog::selectActiveInstance()
336{
337 const auto active = InstanceManager::singleton().currentInstance();
338
339 if (active) {
340 for (std::size_t i = 0; i < m_instances.size(); ++i) {
341 if (m_instances[i]->displayName() == active->displayName()) {
342 select(i);
343
344 ui->list->scrollTo(m_filter.mapFromSource(m_filter.sourceModel()->index(i, 0)));
345
346 return;
347 }
348 }
349 }
350
351 select(0);
352}
353
354void InstanceManagerDialog::openSelectedInstance()
355{

Callers

nothing calls this directly

Calls 5

currentInstanceMethod · 0.45
sizeMethod · 0.45
displayNameMethod · 0.45
mapFromSourceMethod · 0.45
indexMethod · 0.45

Tested by

no test coverage detected