- fix: when running problem cases, the output textbox might be wrongly cleared.
This commit is contained in:
parent
a95475190c
commit
79aecde9a5
1
NEWS.md
1
NEWS.md
|
@ -14,6 +14,7 @@ Red Panda C++ Version 0.14.1
|
|||
- fix: editor's font size set by ctrl+mouse wheel will be reset by open the option dialog
|
||||
- fix: actions not correctly disabled when compile
|
||||
- fix: can't differentiate disabled and enabled buttons, when using contrast icon set
|
||||
- fix: when running problem cases, the output textbox might be wrongly cleared.
|
||||
|
||||
Red Panda C++ Version 0.14.0
|
||||
- enhancement: custom icon set ( in the configuration folder)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -4069,9 +4069,14 @@ void MainWindow::onOJProblemCaseStarted(const QString& id,int current, int total
|
|||
POJProblemCase problemCase = mOJProblemModel.getCase(row);
|
||||
problemCase->testState = ProblemCaseTestState::Testing;
|
||||
mOJProblemModel.update(row);
|
||||
QModelIndex idx = ui->lstProblemCases->currentIndex();
|
||||
if (idx.isValid()) {
|
||||
if (row == idx.row()) {
|
||||
ui->txtProblemCaseOutput->clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::onOJProblemCaseFinished(const QString& id, int current, int total)
|
||||
{
|
||||
|
@ -4084,18 +4089,17 @@ void MainWindow::onOJProblemCaseFinished(const QString& id, int current, int tot
|
|||
ProblemCaseTestState::Failed;
|
||||
mOJProblemModel.update(row);
|
||||
QModelIndex idx = ui->lstProblemCases->currentIndex();
|
||||
if (idx.isValid()) {
|
||||
if (row == idx.row()) {
|
||||
if (!idx.isValid() || row != idx.row()) {
|
||||
ui->lstProblemCases->setCurrentIndex(mOJProblemModel.index(row,0));
|
||||
}
|
||||
updateProblemCaseOutput(problemCase);
|
||||
}
|
||||
}
|
||||
}
|
||||
ui->pbProblemCases->setMaximum(total);
|
||||
ui->pbProblemCases->setValue(current);
|
||||
updateProblemTitle();
|
||||
}
|
||||
|
||||
void MainWindow::onOJProblemCaseNewOutputGetted(const QString &, const QString &line)
|
||||
void MainWindow::onOJProblemCaseNewOutputGetted(const QString &id, const QString &line)
|
||||
{
|
||||
ui->txtProblemCaseOutput->appendPlainText(line);
|
||||
}
|
||||
|
@ -5869,6 +5873,10 @@ void MainWindow::on_btnSaveProblemSet_clicked()
|
|||
QDir().absolutePath(),
|
||||
tr("Problem Set Files (*.pbs)"));
|
||||
if (!fileName.isEmpty()) {
|
||||
QFileInfo fileInfo(fileName);
|
||||
if (fileInfo.suffix().isEmpty()) {
|
||||
fileName.append(".pbs");
|
||||
}
|
||||
QDir::setCurrent(extractFileDir(fileName));
|
||||
try {
|
||||
applyCurrentProblemCaseChanges();
|
||||
|
|
|
@ -543,6 +543,7 @@
|
|||
<widget class="IssuesTable" name="tableIssues">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>50</weight>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
|
@ -1388,7 +1389,7 @@
|
|||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>1114</width>
|
||||
<height>25</height>
|
||||
<height>26</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menuFile">
|
||||
|
@ -1542,7 +1543,7 @@
|
|||
</property>
|
||||
<widget class="QMenu" name="menuTool_Windows">
|
||||
<property name="title">
|
||||
<string>Tool Windows</string>
|
||||
<string>Tool Panels</string>
|
||||
</property>
|
||||
<addaction name="actionProject"/>
|
||||
<addaction name="actionWatch"/>
|
||||
|
@ -2521,7 +2522,7 @@
|
|||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Tool Window Bars</string>
|
||||
<string>Show Tool Panels</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionStatus_Bar">
|
||||
|
|
Loading…
Reference in New Issue