fix: crash when exit
This commit is contained in:
parent
d27f8c1c50
commit
afbaaa07a6
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue