- enhancement: Run all cases button not correct disabled when no case exits.
This commit is contained in:
parent
4b9e51a925
commit
efc7af7f46
3
NEWS.md
3
NEWS.md
|
@ -11,7 +11,8 @@ Red Panda C++ Version 2.7
|
||||||
- enhancement: Better error message when trying to debug with Release compile set.
|
- enhancement: Better error message when trying to debug with Release compile set.
|
||||||
- enhancement: Add missing space char color settings in color schemes
|
- enhancement: Add missing space char color settings in color schemes
|
||||||
- enhancement: Export FPS (free problem set) files.
|
- enhancement: Export FPS (free problem set) files.
|
||||||
- enhancement: Improve context menus.
|
- enhancement: Run all cases button not correct disabled when no case exits.
|
||||||
|
- enhancement: Speed up remove problems.
|
||||||
|
|
||||||
Red Panda C++ Version 2.6
|
Red Panda C++ Version 2.6
|
||||||
|
|
||||||
|
|
|
@ -3786,8 +3786,8 @@ void MainWindow::onTableProblemCasesContextMenu(const QPoint &pos)
|
||||||
QModelIndex idx = ui->tblProblemCases->currentIndex();
|
QModelIndex idx = ui->tblProblemCases->currentIndex();
|
||||||
menu.addAction(mProblem_RunAllCases);
|
menu.addAction(mProblem_RunAllCases);
|
||||||
menu.addAction(mProblem_RunCurrentCase);
|
menu.addAction(mProblem_RunCurrentCase);
|
||||||
mProblem_RunAllCases->setEnabled(mOJProblemModel.count()>0);
|
mProblem_RunAllCases->setEnabled(mOJProblemModel.count()>0 && ui->actionRun->isEnabled());
|
||||||
mProblem_RunCurrentCase->setEnabled(idx.isValid());
|
mProblem_RunCurrentCase->setEnabled(idx.isValid() && ui->actionRun->isEnabled());
|
||||||
menu.exec(ui->tblProblemCases->mapToGlobal(pos));
|
menu.exec(ui->tblProblemCases->mapToGlobal(pos));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3846,7 +3846,7 @@ void MainWindow::onProblemCaseIndexChanged(const QModelIndex ¤t, const QMo
|
||||||
POJProblemCase problemCase = mOJProblemModel.getCase(idx.row());
|
POJProblemCase problemCase = mOJProblemModel.getCase(idx.row());
|
||||||
if (problemCase) {
|
if (problemCase) {
|
||||||
ui->btnRemoveProblemCase->setEnabled(true);
|
ui->btnRemoveProblemCase->setEnabled(true);
|
||||||
ui->btnRunAllProblemCases->setEnabled(true);
|
ui->btnRunAllProblemCases->setEnabled(ui->actionRun->isEnabled());
|
||||||
fillProblemCaseInputAndExpected(problemCase);
|
fillProblemCaseInputAndExpected(problemCase);
|
||||||
ui->txtProblemCaseOutput->clear();
|
ui->txtProblemCaseOutput->clear();
|
||||||
ui->txtProblemCaseOutput->setPlainText(problemCase->output);
|
ui->txtProblemCaseOutput->setPlainText(problemCase->output);
|
||||||
|
|
Loading…
Reference in New Issue