snu-quiqcl / iquip

Ion trap Quantum computing User Interface Project
GNU General Public License v3.0
7 stars 0 forks source link

Log viewer curser position falls behind #179

Closed kangz12345 closed 1 year ago

kangz12345 commented 1 year ago

Describe the bug

At some point the log viewer's curser position falls behind, so since then the logs are printed in the middle of the previous logs. For example,

[time0] log0
[time1] log1
[time3] log3  # <-- something happened between time2 and time3
[time4] log4
...
[time2] log2

Expected behavior

Log curser should always be after the most recent log message.

To Reproduce

Steps to reproduce the behavior: Not identified. Maybe exception or thread issue...?

kangz12345 commented 1 year ago

I found the cause: we need to reset the cursor position to the end before inserting the log message. The cursor position is changed by user's mouse click.