forked from M-Labs/artiq
gui.log: work around a Qt layout bug.
This commit is contained in:
parent
85222783ee
commit
95470a59e5
|
@ -218,6 +218,15 @@ class _LogDock(dockarea.Dock):
|
||||||
if self.scroll_at_bottom:
|
if self.scroll_at_bottom:
|
||||||
self.log.scrollToBottom()
|
self.log.scrollToBottom()
|
||||||
|
|
||||||
|
# HACK:
|
||||||
|
# If we don't do this, after we first add some rows, the "Time"
|
||||||
|
# column gets undersized and the text in it gets wrapped.
|
||||||
|
# We can call self.log.resizeColumnsToContents(), which fixes
|
||||||
|
# that problem, but now the message column is too large and
|
||||||
|
# a horizontal scrollbar appears.
|
||||||
|
# This is almost certainly a Qt layout bug.
|
||||||
|
self.log.horizontalHeader().reset()
|
||||||
|
|
||||||
# HACK:
|
# HACK:
|
||||||
# Qt intermittently likes to scroll back to the top when rows are removed.
|
# Qt intermittently likes to scroll back to the top when rows are removed.
|
||||||
# Work around this by restoring the scrollbar to the previously memorized
|
# Work around this by restoring the scrollbar to the previously memorized
|
||||||
|
|
Loading…
Reference in New Issue