Skip to content

Commit 03feb1a

Browse files
committed
Added default check for 'opt' extra flags (previously any flag marked as opt would be added to the cmdline by default)
1 parent 1946c9d commit 03feb1a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

MiniZincIDE/mainwindow.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1595,7 +1595,12 @@ QStringList MainWindow::parseConf(const ConfMode& confMode, const QString& model
15951595
break;
15961596
case SolverFlag::T_OPT:
15971597
case SolverFlag::T_SOLVER:
1598-
ret << ef.first.name << static_cast<QComboBox*>(ef.second)->currentText();
1598+
{
1599+
QString s = static_cast<QComboBox*>(ef.second)->currentText();
1600+
if (!s.isEmpty() && s!=ef.first.def) {
1601+
ret << ef.first.name << s;
1602+
}
1603+
}
15991604
break;
16001605
case SolverFlag::T_INT:
16011606
case SolverFlag::T_FLOAT:

0 commit comments

Comments
 (0)