- fix: Problem's memory limit unit can't be correctly saved.
This commit is contained in:
parent
989f1a892d
commit
d80abbcf94
1
NEWS.md
1
NEWS.md
|
@ -20,6 +20,7 @@ Red Panda C++ Version 2.16
|
||||||
- fix: Shouldn't try evaluate value of the selection in the cpu info dialog.
|
- fix: Shouldn't try evaluate value of the selection in the cpu info dialog.
|
||||||
- enhancement: Show oct/bin/bin value in the memory view's tooltip.
|
- enhancement: Show oct/bin/bin value in the memory view's tooltip.
|
||||||
- fix: Hex float point literal is not correctly colored.
|
- fix: Hex float point literal is not correctly colored.
|
||||||
|
- fix: Problem's memory limit unit can't be correctly saved.
|
||||||
|
|
||||||
Red Panda C++ Version 2.15
|
Red Panda C++ Version 2.15
|
||||||
|
|
||||||
|
|
|
@ -79,13 +79,13 @@ void OJProblemPropertyWidget::saveToProblem(POJProblem problem)
|
||||||
problem->description = ui->txtDescription->toHtml();
|
problem->description = ui->txtDescription->toHtml();
|
||||||
problem->memoryLimit = ui->spinMemoryLimit->value();
|
problem->memoryLimit = ui->spinMemoryLimit->value();
|
||||||
problem->timeLimit = ui->spinTimeLimit->value();
|
problem->timeLimit = ui->spinTimeLimit->value();
|
||||||
if (ui->cbTimeLimitUnit->currentText()=="sec")
|
if (ui->cbTimeLimitUnit->currentText()==tr("sec"))
|
||||||
problem->timeLimitUnit = ProblemTimeLimitUnit::Seconds;
|
problem->timeLimitUnit = ProblemTimeLimitUnit::Seconds;
|
||||||
else
|
else
|
||||||
problem->timeLimitUnit = ProblemTimeLimitUnit::Milliseconds;
|
problem->timeLimitUnit = ProblemTimeLimitUnit::Milliseconds;
|
||||||
if (ui->cbTimeLimitUnit->currentText()=="KB")
|
if (ui->cbMemoryLimitUnit->currentText()==tr("KB"))
|
||||||
problem->memoryLimitUnit = ProblemMemoryLimitUnit::KB;
|
problem->memoryLimitUnit = ProblemMemoryLimitUnit::KB;
|
||||||
else if (ui->cbTimeLimitUnit->currentText()=="MB")
|
else if (ui->cbMemoryLimitUnit->currentText()==tr("MB"))
|
||||||
problem->memoryLimitUnit = ProblemMemoryLimitUnit::MB;
|
problem->memoryLimitUnit = ProblemMemoryLimitUnit::MB;
|
||||||
else
|
else
|
||||||
problem->memoryLimitUnit = ProblemMemoryLimitUnit::GB;
|
problem->memoryLimitUnit = ProblemMemoryLimitUnit::GB;
|
||||||
|
|
Loading…
Reference in New Issue