MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / on_projectBrowser_openRequested

Method on_projectBrowser_openRequested

MiniZincIDE/mainwindow.cpp:2787–2810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2785}
2786
2787void MainWindow::on_projectBrowser_openRequested(const QStringList& files)
2788{
2789 QStringList openFiles = getOpenFiles();
2790 for (auto& f : files) {
2791 if (f.endsWith(".mpc")) {
2792 int i = 0;
2793 for (auto sc : ui->config_window->solverConfigs()) {
2794 if (sc->paramFile == f) {
2795 ui->config_window->setCurrentIndex(i);
2796 break;
2797 }
2798 i++;
2799 }
2800 continue;
2801 }
2802
2803 int index = openFiles.indexOf(f);
2804 if (index == -1) {
2805 createEditor(f, false, false, false, true);
2806 } else {
2807 ui->tabWidget->setCurrentIndex(index);
2808 }
2809 }
2810}
2811
2812void MainWindow::on_projectBrowser_removeRequested(const QStringList& files)
2813{

Callers

nothing calls this directly

Calls 1

setCurrentIndexMethod · 0.80

Tested by

no test coverage detected