add support for add a highlight for the currently active input line to the line number display

This commit is contained in:
Axel Kohlmeyer
2023-08-24 21:25:57 -04:00
parent 3a7efdfb8c
commit 8a7c1f3d0d
3 changed files with 30 additions and 7 deletions

View File

@ -659,6 +659,13 @@ void LammpsGui::logupdate()
t_remain = lammps.get_thermo("cpuremain");
t_total = t_elapsed + t_remain + 1.0e-10;
completed = t_elapsed / t_total * 1000.0;
int nline = -1;
void *ptr = lammps.last_thermo("line", 0);
if (ptr) {
nline = *((int *)ptr);
ui->textEdit->setHighlight(nline);
}
}
progress->setValue(completed);
@ -747,6 +754,7 @@ void LammpsGui::run_done()
delete logupdater;
logupdater = nullptr;
progress->setValue(1000);
ui->textEdit->setHighlight(-1);
capturer->EndCapture();
auto log = capturer->GetCapture();