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();
|
updateLayout();
|
||||||
if (!force) {
|
if (!force) {
|
||||||
editor = getEditor();
|
editor = getEditor();
|
||||||
editor->activate();
|
if (transferFocus && editor)
|
||||||
//pMainWindow->updateClassBrowserForEditor(editor);
|
editor->activate();
|
||||||
|
else
|
||||||
|
pMainWindow->updateClassBrowserForEditor(editor);
|
||||||
}
|
}
|
||||||
if (pageCount()==0) {
|
if (pageCount()==0) {
|
||||||
pMainWindow->updateAppTitle();
|
pMainWindow->updateAppTitle();
|
||||||
|
|
|
@ -3358,6 +3358,11 @@ void MainWindow::onOJProblemCaseFinished(const QString &id, int current, int tot
|
||||||
ProblemCaseTestState::Passed:
|
ProblemCaseTestState::Passed:
|
||||||
ProblemCaseTestState::Failed;
|
ProblemCaseTestState::Failed;
|
||||||
mOJProblemModel.update(row);
|
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->setMaximum(total);
|
||||||
ui->pbProblemCases->setValue(current);
|
ui->pbProblemCases->setValue(current);
|
||||||
|
|
Loading…
Reference in New Issue