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

Method setSelectedInstanceById

launcher/ui/MainWindow.cpp:1528–1539  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1526}
1527
1528void MainWindow::setSelectedInstanceById(const QString &id)
1529{
1530 if (id.isNull())
1531 return;
1532 const QModelIndex index = APPLICATION->instances()->getInstanceIndexById(id);
1533 if (index.isValid())
1534 {
1535 QModelIndex selectionIndex = proxymodel->mapFromSource(index);
1536 view->selectionModel()->setCurrentIndex(selectionIndex, QItemSelectionModel::ClearAndSelect);
1537 updateStatusCenter();
1538 }
1539}
1540
1541void MainWindow::on_actionChangeInstGroup_triggered()
1542{

Callers

nothing calls this directly

Calls 4

getInstanceIndexByIdMethod · 0.80
instancesMethod · 0.80
mapFromSourceMethod · 0.80
isValidMethod · 0.45

Tested by

no test coverage detected