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

Method on_actionAdd_triggered

launcher/ui/pages/instance/ServersPage.cpp:775–788  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

773}
774
775void ServersPage::on_actionAdd_triggered()
776{
777 int position = m_model->addEmptyRow(currentServer + 1);
778 if(position < 0)
779 {
780 return;
781 }
782 // select the new row
783 ui->serversView->selectionModel()->setCurrentIndex(
784 m_model->index(position),
785 QItemSelectionModel::SelectCurrent | QItemSelectionModel::Clear | QItemSelectionModel::Rows
786 );
787 currentServer = position;
788}
789
790void ServersPage::on_actionRemove_triggered()
791{

Callers

nothing calls this directly

Calls 2

addEmptyRowMethod · 0.80
indexMethod · 0.45

Tested by

no test coverage detected