diff --git a/RedPandaIDE/editorlist.cpp b/RedPandaIDE/editorlist.cpp index 103fa6c0..82b8c57b 100644 --- a/RedPandaIDE/editorlist.cpp +++ b/RedPandaIDE/editorlist.cpp @@ -152,8 +152,10 @@ bool EditorList::closeEditor(Editor* editor, bool transferFocus, bool force) { updateLayout(); if (!force) { editor = getEditor(); - editor->activate(); - //pMainWindow->updateClassBrowserForEditor(editor); + if (transferFocus && editor) + editor->activate(); + else + pMainWindow->updateClassBrowserForEditor(editor); } if (pageCount()==0) { pMainWindow->updateAppTitle(); diff --git a/RedPandaIDE/mainwindow.cpp b/RedPandaIDE/mainwindow.cpp index 0c3f7ad6..4c6e4d40 100644 --- a/RedPandaIDE/mainwindow.cpp +++ b/RedPandaIDE/mainwindow.cpp @@ -3358,6 +3358,11 @@ void MainWindow::onOJProblemCaseFinished(const QString &id, int current, int tot ProblemCaseTestState::Passed: ProblemCaseTestState::Failed; mOJProblemModel.update(row); + QModelIndex idx = ui->lstProblemCases->currentIndex(); + if (idx.isValid()) { + if (row == idx.row()) + ui->txtProblemCaseOutput->setText(problemCase->output); + } } ui->pbProblemCases->setMaximum(total); ui->pbProblemCases->setValue(current);