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

Method setSelectedInstanceById

launcher/ui/MainWindow.cpp:1858–1869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1856}
1857
1858void MainWindow::setSelectedInstanceById(const QString &id)
1859{
1860 if (id.isNull())
1861 return;
1862 const QModelIndex index = APPLICATION->instances()->getInstanceIndexById(id);
1863 if (index.isValid())
1864 {
1865 QModelIndex selectionIndex = proxymodel->mapFromSource(index);
1866 view->selectionModel()->setCurrentIndex(selectionIndex, QItemSelectionModel::ClearAndSelect);
1867 updateStatusCenter();
1868 }
1869}
1870
1871void MainWindow::on_actionChangeInstGroup_triggered()
1872{

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